Android 仿真器意外停止应用程序
我已经创建了一个应用程序。代码很好,没有错误,但在模拟器上运行时会显示消息“应用程序意外停止” 舱单代码:Android 仿真器意外停止应用程序,android,android-emulator,android-manifest,Android,Android Emulator,Android Manifest,我已经创建了一个应用程序。代码很好,没有错误,但在模拟器上运行时会显示消息“应用程序意外停止” 舱单代码: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.gregjacobs.enhancedquotes"> <application android:icon="@draw
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.gregjacobs.enhancedquotes">
<application android:icon="@drawable/icon">
<activity android:name=".QuotesMain" 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=".QuoteEdit" android:label="@string/app_name"></activity>
</application>
</manifest>
<!--<?xml version="1.0" encoding="utf-8"?>-->
<!--<manifest xmlns:android="http://schemas.android.com/apk/res/android"-->
<!-- package="com.gregjacobs.enhancedquotes"-->
<!-- android:versionCode="1"-->
<!-- android:versionName="1.0">-->
<!-- <application android:icon="@drawable/icon" android:label="@string/app_name">-->
<!-- <activity android:name=".quotes"-->
<!-- android:label="@string/app_name">-->
<!-- <intent-filter>-->
<!-- <action android:name="android.intent.action.MAIN" />-->
<!-- <category android:name="android.intent.category.LAUNCHER" />-->
<!-- </intent-filter>-->
<!-- </activity>-->
<!---->
<!-- </application>-->
<!---->
<!---->
<!--</manifest> -->
quoteMain.java中第51行有什么内容?根据您的日志,QuotesMain.java中的第51行出现了错误,有一个声明private static final int ACTIVITY_EDIT=1;你能发布quoteMain.java吗?因为该行不能是错误源。如果查看logcat,则错误位于onCreate()
内。如果在方法中声明了一个静态变量,您甚至不能进行编译。