我使用 Eclipse并导入WearableNotificationsSample,以及 AndroidWearPrevIEw的ElizaChat示例代码.
它失败了.为什么?
03-20 14:34:34.418: E/AndroIDRuntime(9989): Process: com.example.androID.prevIEw.support.wearable.notifications,PID: 998903-20 14:34:34.418: E/AndroIDRuntime(9989): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.androID.prevIEw.support.wearable.notifications/com.example.androID.prevIEw.support.wearable.notifications.MainActivity}: java.lang.classNotFoundException: DIDn't find class "com.example.androID.prevIEw.support.wearable.notifications.MainActivity" on path: DexPathList[[zip file "/data/app/com.example.androID.prevIEw.support.wearable.notifications-2.apk"],nativelibraryDirectorIEs=[/data/app-lib/com.example.androID.prevIEw.support.wearable.notifications-2,/vendor/lib,/system/lib]]03-20 14:34:34.418: E/AndroIDRuntime(9989): at androID.app.ActivityThread.performlaunchActivity(ActivityThread.java:2121)03-20 14:34:34.418: E/AndroIDRuntime(9989): at androID.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)03-20 14:34:34.418: E/AndroIDRuntime(9989): at androID.app.ActivityThread.access0(ActivityThread.java:135)03-20 14:34:34.418: E/AndroIDRuntime(9989): at androID.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)03-20 14:34:34.418: E/AndroIDRuntime(9989): at androID.os.Handler.dispatchMessage(Handler.java:102)03-20 14:34:34.418: E/AndroIDRuntime(9989): at androID.os.Looper.loop(Looper.java:136)03-20 14:34:34.418: E/AndroIDRuntime(9989): at androID.app.ActivityThread.main(ActivityThread.java:5017)03-20 14:34:34.418: E/AndroIDRuntime(9989): at java.lang.reflect.Method.invokeNative(Native Method)03-20 14:34:34.418: E/AndroIDRuntime(9989): at java.lang.reflect.Method.invoke(Method.java:515)03-20 14:34:34.418: E/AndroIDRuntime(9989): at com.androID.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)03-20 14:34:34.418: E/AndroIDRuntime(9989): at com.androID.internal.os.ZygoteInit.main(ZygoteInit.java:595)03-20 14:34:34.418: E/AndroIDRuntime(9989): at dalvik.system.NativeStart.main(Native Method)03-20 14:34:34.418: E/AndroIDRuntime(9989): Caused by: java.lang.classNotFoundException: DIDn't find class "com.example.androID.prevIEw.support.wearable.notifications.MainActivity" on path: DexPathList[[zip file "/data/app/com.example.androID.prevIEw.support.wearable.notifications-2.apk"],/system/lib]]03-20 14:34:34.418: E/AndroIDRuntime(9989): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)03-20 14:34:34.418: E/AndroIDRuntime(9989): at java.lang.classLoader.loadClass(ClassLoader.java:497)03-20 14:34:34.418: E/AndroIDRuntime(9989): at java.lang.classLoader.loadClass(ClassLoader.java:457)03-20 14:34:34.418: E/AndroIDRuntime(9989): at androID.app.Instrumentation.newActivity(Instrumentation.java:1061)03-20 14:34:34.418: E/AndroIDRuntime(9989): at androID.app.ActivityThread.performlaunchActivity(ActivityThread.java:2112)解决方法 我注意到源代码在java文件夹中.要在eclipse上运行它,修复是右键单击java文件夹并选择Build Path – >用作源文件夹
当然还要添加支持和androID wearable-prevIEw库
总结以上是内存溢出为你收集整理的wear-os – Android穿样本代码异常全部内容,希望文章能够帮你解决wear-os – Android穿样本代码异常所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)