Android project-eclipse problem when adding an activity that I want to be the main one
I added a new activity to my android project and I want this one to be the main one. In run configuration, in tab android at Launch Options I can not see the new 开发者_运维技巧one to set it. Can I set it from somewhere else or I have to do new project, or copy the content from the old activity to new one and the new one to old one? Is a lost of time in this case.
You hace to declare on your manifest that activity as the main one:
<activity android:name=".YourActivity android:screenOrientation="portrait"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
精彩评论