我正在使用Google App Engine创建以下关于创建Android应用程序的教程:https://cloud.google.com/developers/articles/how-to-build-mobile-app-with-app-engine-backend-tutorial
我在windows 7中使用Eclipse.我到了运行应用程序的部分,以显示“places.csv”中新上传的信息.问题是我收到以下错误:
03-15 17:00:31.137: E/AndroIDRuntime(1151): FATAL EXCEPTION: main03-15 17:00:31.137: E/AndroIDRuntime(1151): Process: com.apps.mobileassistant, PID: 115103-15 17:00:31.137: E/AndroIDRuntime(1151): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.apps.mobileassistant/com.apps.mobileassistant.MainActivity}: java.lang.classNotFoundException: DIDn't find class "com.apps.mobileassistant.MainActivity" on path: DexPathList[[zip file "/data/app/com.apps.mobileassistant-2.apk"],nativelibraryDirectorIEs=[/data/app-lib/com.apps.mobileassistant-2, /system/lib]]03-15 17:00:31.137: E/AndroIDRuntime(1151): at androID.app.ActivityThread.performlaunchActivity(ActivityThread.java:2102)03-15 17:00:31.137: E/AndroIDRuntime(1151): at androID.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2226)03-15 17:00:31.137: E/AndroIDRuntime(1151): at androID.app.ActivityThread.access0(ActivityThread.java:135)03-15 17:00:31.137: E/AndroIDRuntime(1151): at androID.app.ActivityThread$H.handleMessage(ActivityThread.java:1397)03-15 17:00:31.137: E/AndroIDRuntime(1151): at androID.os.Handler.dispatchMessage(Handler.java:102)03-15 17:00:31.137: E/AndroIDRuntime(1151): at androID.os.Looper.loop(Looper.java:137)03-15 17:00:31.137: E/AndroIDRuntime(1151): at androID.app.ActivityThread.main(ActivityThread.java:4998)03-15 17:00:31.137: E/AndroIDRuntime(1151): at java.lang.reflect.Method.invokeNative(Native Method)03-15 17:00:31.137: E/AndroIDRuntime(1151): at java.lang.reflect.Method.invoke(Method.java:515)03-15 17:00:31.137: E/AndroIDRuntime(1151): at com.androID.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)03-15 17:00:31.137: E/AndroIDRuntime(1151): at com.androID.internal.os.ZygoteInit.main(ZygoteInit.java:593)03-15 17:00:31.137: E/AndroIDRuntime(1151): at dalvik.system.NativeStart.main(Native Method)03-15 17:00:31.137: E/AndroIDRuntime(1151): Caused by: java.lang.classNotFoundException: DIDn't find class "com.apps.mobileassistant.MainActivity" on path: DexPathList[[zip file "/data/app/com.apps.mobileassistant-2.apk"],nativelibraryDirectorIEs=[/data/app-lib/com.apps.mobileassistant-2, /system/lib]]03-15 17:00:31.137: E/AndroIDRuntime(1151): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)03-15 17:00:31.137: E/AndroIDRuntime(1151): at java.lang.classLoader.loadClass(ClassLoader.java:497)03-15 17:00:31.137: E/AndroIDRuntime(1151): at java.lang.classLoader.loadClass(ClassLoader.java:457)03-15 17:00:31.137: E/AndroIDRuntime(1151): at androID.app.Instrumentation.newActivity(Instrumentation.java:1061)03-15 17:00:31.137: E/AndroIDRuntime(1151): at androID.app.ActivityThread.performlaunchActivity(ActivityThread.java:2093)
MobileAssistant App Manifest.xml
<?xml version="1.0" enCoding="utf-8" standalone="no"?><manifest xmlns:androID="http://schemas.androID.com/apk/res/androID" androID:versionCode="1" androID:versionname="1.0" package="com.apps.mobileassistant"> <uses-sdk androID:minSdkVersion="10" androID:targetSdkVersion="19"/> <uses-permission androID:name="androID.permission.INTERNET"/> <permission androID:name="com.apps.mobileassistant.permission.C2D_MESSAGE" androID:protectionLevel="signature"/> <uses-permission androID:name="com.apps.mobileassistant.permission.C2D_MESSAGE"/> <uses-permission androID:name="com.Google.androID.c2dm.permission.RECEIVE"/> <uses-permission androID:name="androID.permission.WAKE_LOCK"/> <uses-permission androID:name="androID.permission.GET_ACCOUNTS"/> <uses-permission androID:name="androID.permission.USE_CREDENTIALS"/> <application androID:allowBackup="true" androID:icon="@drawable/ic_launcher" androID:label="@string/app_name" androID:theme="@style/Apptheme"> <activity androID:label="@string/app_name" androID:name="com.apps.mobileassistant.MainActivity"> <intent-filter> <action androID:name="androID.intent.action.MAIN"/> <category androID:name="androID.intent.category.LAUNCHER"/> </intent-filter> </activity> <service androID:name=".GCMIntentService"/> <receiver androID:name="com.Google.androID.gcm.GCMbroadcastReceiver" androID:permission="com.Google.androID.c2dm.permission.SEND"> <intent-filter> <action androID:name="com.Google.androID.c2dm.intent.RECEIVE"/> <category androID:name="com.apps.mobileassistant"/> </intent-filter> <intent-filter> <action androID:name="com.Google.androID.c2dm.intent.REGISTRATION"/> <category androID:name="com.apps.mobileassistant"/> </intent-filter> </receiver> <activity androID:launchMode="singletop" androID:name=".Registeractivity"/></application></manifest>
此外,当处于调试模式时,我在Thread [< 1>]中得到“Source Not Found”错误.主要].
有人可以帮我弄这个吗?
解决方法:
就像您当前的消息错误对您说的一样:
ComponentInfo{com.apps.mobileassistant/com.apps.mobileassistant.MainActivity}:java.lang.classNotFoundException: DIDn't find class "com.apps.mobileassistant.MainActivity" on path: DexPathList[[zip file "/data/app/com.apps.mobileassistant-2.apk"],nativelibraryDirectorIEs=[/data/app-lib/com.apps.mobileassistant-2
您要么在设置项目和所需的库时犯了一些错误,要么只是缺少一些类,或者没有通过导入和类名在代码中通知相应的类.
总结以上是内存溢出为你收集整理的Eclipse Android:没找到类全部内容,希望文章能够帮你解决Eclipse Android:没找到类所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)