开发者

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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜