Eclipse - creating a new activity

I have a problem when I create a new project for Android. I fill in the application name and package name, then go to the next script and install the icon. In the following scenarios, I select Blank activity and click the following when this screen appears:

Eclipse create activity dialog

I introduce everything, but I do not know what to do with the Hierarchical parent. A few days ago, it worked fine, but now that I have selected something from the list on the left and create activity, the eclipse, if I did not write something, says that this is wrong.

Can anybody help me?

+6
source share
6 answers

For the Activity parameter, set it to android.app.activity.

+3
source

I have the same problem as you. A day later, I found a way.

It is very simple. reinstall the ADT plugin: In Eclipse, Help> Install New Software .... Click "Add" in the upper right corner. Enter the "ADT Plugin" for the name and URL = http://dl-ssl.google.com/android/eclipse/ Then just type to the end

In the full tutorial on installing the ADT plugin, you can see: http://developer.android.com/sdk/installing/installing-adt.html

+3
source

Your mistake concerns the name of the action confirming the assembly of the sdk project

hierarchical parent activity is commonly used to provide a default implementation for the UP button

0
source

1. Combine your package name, and then in the Hierarchical Parent box. (any words to skip this step)

2.AndroidManifest.xml to run you need "android.intent.action.MAIN". Add source code

 <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> 

like this:

 <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name=".MainActivity" android:label="@string/title_activity_main" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> 
0
source

Version 14 tool platform has this problem, but not version 13.

http://dl-ssl.google.com/android/repository/platform-tools_r13-linux.zip

I supported my current (problematic) / android-sdk / platform tools, deleted the old folder and replaced it with version 13, launched eclipse, reset the android-sdk path (windows> preferences> android, don 'Don’t forget to click β€œapply”) and recreate my avd.

Version 13 also has a hierarchical parent text field, but it is optional.

0
source

The problem is an error with the Application Wizard ..., which is trying to integrate the Action Wizard within itself. The problem is that the built-in activity wizard does not work correctly if an existing project does not exist.

Therefore, an easy solution to this problem from the Project Wizard, just create a basic main action with "none" for the navigation type and click "Finish". Then, once the project has been created, use the Action Wizard to create the desired core activity.

As a bonus, the activity wizard even reorganizes the code to use this new action as the main action!

0
source

Source: https://habr.com/ru/post/920948/


All Articles