本文介绍了当类存在ClassNotFound的异常,并在清单中声明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经收到此错误,因为每次我导入现有的项目到一个新的工作区。
I have been getting this error every since importing my existing project into a new workspace.
02-12 11:30:58.140: E/AndroidRuntime(16605): FATAL EXCEPTION: main
02-12 11:30:58.140: E/AndroidRuntime(16605): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.fttech.full_version_hippos/com.fttech.hh.MenuActivity}: java.lang.ClassNotFoundException: com.fttech.hh.MenuActivity in loader dalvik.system.PathClassLoader[/data/app/com.fttech.hh-1.apk]
02-12 11:30:58.140: E/AndroidRuntime(16605): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1739)
02-12 11:30:58.140: E/AndroidRuntime(16605): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1831)
02-12 11:30:58.140: E/AndroidRuntime(16605): at android.app.ActivityThread.access$500(ActivityThread.java:122)
02-12 11:30:58.140: E/AndroidRuntime(16605): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1024)
02-12 11:30:58.140: E/AndroidRuntime(16605): at android.os.Handler.dispatchMessage(Handler.java:99)
02-12 11:30:58.140: E/AndroidRuntime(16605): at android.os.Looper.loop(Looper.java:132)
02-12 11:30:58.140: E/AndroidRuntime(16605): at android.app.ActivityThread.main(ActivityThread.java:4123)
02-12 11:30:58.140: E/AndroidRuntime(16605): at java.lang.reflect.Method.invokeNative(Native Method)
02-12 11:30:58.140: E/AndroidRuntime(16605): at java.lang.reflect.Method.invoke(Method.java:491)
02-12 11:30:58.140: E/AndroidRuntime(16605): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
02-12 11:30:58.140: E/AndroidRuntime(16605): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
02-12 11:30:58.140: E/AndroidRuntime(16605): at dalvik.system.NativeStart.main(Native Method)
02-12 11:30:58.140: E/AndroidRuntime(16605): Caused by: java.lang.ClassNotFoundException: com.fttech.hh.MenuActivity in loader dalvik.system.PathClassLoader[/data/app/com.fttech.hh-1.apk]
02-12 11:30:58.140: E/AndroidRuntime(16605): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:251)
02-12 11:30:58.140: E/AndroidRuntime(16605): at java.lang.ClassLoader.loadClass(ClassLoader.java:540)
下面是我的清单和其他一切是正确的包在我的源文件夹。
Here is my manifest and everything else is in the correct package in my source folder.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.fttech.hh"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="4" />
<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:icon="@drawable/ic_launcher" android:label="@string/app_name">
<activity android:name=".MenuActivity"
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=".Arcade_MainGame"></activity>
<activity android:name=".MainGame"></activity>
<activity android:name=".MyPreferenceClass"></activity>
<activity android:name=".unlockable"></activity>
</application>
</manifest>
你们看到什么即时通讯做错了什么?
Anyone see what im doing wrong?
推荐答案
确定,这是在清单中。是否MenuActivity有权包
?是MenuActivity present的apk文件?
OK, it's in the manifest. Does MenuActivity have the right package
? Is MenuActivity present in the .apk?
这篇关于当类存在ClassNotFound的异常,并在清单中声明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!