一个项目android中是否可以有两个以上的包?
我已经在队列清单中声明,但第三个包突然强制关闭..我真的不知道原因..但这是我的队列清单代码:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ike.doctors"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8"
android:targetSdkVersion="8"/>
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".MainMenuActivity"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.NoTitleBar"></activity>
<activity android:name=".MenuRegisActivity"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.NoTitleBar"></activity>
<activity android:name="com.ike.hospitalize.MenuHospitalizeActivity"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.NoTitleBar"></activity>
<activity android:name="com.ike.hospitalize.MenuRoomCategoriesActivity"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.NoTitleBar"></activity>
<activity android:name="com.ike.emergency.MenuRegisAActivity"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.NoTitleBar"></activity>
<activity android:name="com.ike.emergency.MenuEmergencyActivity"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.NoTitleBar"></activity>
</application>
</manifest>
com.emergency.MenuEmergencyActivity 是强制关闭..
这是日志猫:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ike.doctors/com.ike.emergency.MenuEmergencyActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
at android.app.ActivityThread.access$2300(ActivityThread.java:125)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at com.ike.emergency.MenuEmergencyActivity.onCreate(MenuEmergencyActivity.java:41)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
有人可以解决我的问题吗?谢谢你