Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse- creating new Activity

I have problem when I create a new Android project. I fill in the name of the app and the package name, then I go to the next scrren and set the icon. On the following scrren I select Blank activity and hit next when this screen appears:

Eclipse create activity dialog

I enter everything, but i donť know what to do with Hierarchical Parent. A few days ago it worked perfectly, but now when I chose something from list on the left, and create activity, eclipse unless I wrote something says it's wrong.

Can anyone help me?

like image 250
user1540293 Avatar asked Jul 20 '12 09:07

user1540293


People also ask

How do I add a new activity to an existing project?

In Android Studio 2, just right click on app and select New > Activity > ... to create desired activity type. Save this answer.

How do you create a new activity?

Step 1: Firstly, click on app > res > layout > Right Click on layout. After that Select New > Activity and choose your Activity as per requirement. Here we choose Blank Activity as shown in figure below. Step 2: After that Customize the Activity in Android Studio.

How to start new activity using intent Android?

To start an activity, use the method startActivity(intent) . This method is defined on the Context object which Activity extends. The following code demonstrates how you can start another activity via an intent. # Start the activity connect to the # specified class Intent i = new Intent(this, ActivityTwo.


2 Answers

For an Activity set it to android.app.activity.

like image 81
Chilledrat Avatar answered Oct 10 '22 08:10

Chilledrat


I got the same problem like yours. After a day, I found the way.

It's very simple. re install the ADT Plugin: In Eclipse, Help > Install New Software.... Click Add, in the top-right corner. Enter "ADT Plugin" for the Name and URL = http://dl-ssl.google.com/android/eclipse/ Then just enter until finish

For the full tutorial how to instal ADT Plugin you can look at: http://developer.android.com/sdk/installing/installing-adt.html

like image 39
Kenrick Avatar answered Oct 10 '22 08:10

Kenrick