Blank activity with fragment not in android studio-ThrowExceptions

Exception or error:

Hi my problem is that when I want to create a new project in Android studio and I want to choose blank activity with fragment is not in add an activity to mobile window. Any solution that help me to fix it?

How to solve:

You can find it once you go to the next page.
Just check the box saying “Use a fragment”and click finish.

enter image description here

###

I found the answer while doing udacity android class.

Select “Blank Activity” then Next

###

As android studio is being updated so now you can just select blank activity then check the box “Use a Fragment” on the next page. then you will have activity with fragment.

Hope this helps..
Cheers.

###

With version 2.1, select “Basic Activity” instead of Blank Activity. You will see the “Use a Fragment” checkbox. Click on it, there you go…

###

I had the same problem with the Android Studio 2.3 (today the latest version), here is the process:

Create new Activity:

Create new Activity

Tell the activity to use a fragment:

Tell the activity to use a fragment

It worked for me. I wish for you as well.

Leave a Reply

Your email address will not be published. Required fields are marked *