ADT更新后的ClassNotFoundException
我最近将Android SDK和Eclipse ADT插件更新到最新版本。现在,当我尝试运行预先存在的Android项目时,LogCat会显示一个ClassNotFoundException
。
我试图创建一个新设备但问题仍然存在。
<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android"package="com.example.myapp"android:versionCode="1"android:versionName="1.0" ><uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17" /><uses-permission android:name="android.permission.INTERNET" /><uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /><uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /><application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name="com.example.myapp.MainActivity" android:label="@string/app_name" android:windowSoftInputMode="stateHidden" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity></application>
05-17 13:09:56.357: E/AndroidRuntime(969): FATAL EXCEPTION: main05-17 13:09:56.357: E/AndroidRuntime(969): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.myapp/com.example.myapp.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.example.myapp.MainActivity" on path: /data/app/com.example.myapp-1.apk 05-17 13:09:56.357: E/AndroidRuntime(969): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2106) 05-17 13:09:56.357: E/AndroidRuntime(969): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
我注意到新的APK文件名为myapp-1.apk,而它通常称为myapp.apk。有人能告诉我如何解决?
慕码人8056858
慕的地10843
相关分类