收藏官网首页
查看: 21827|回复: 4

[问答] Android APP可以编译生成APK,但是不能运行

3

主题

11

帖子

123

积分

注册会员

Rank: 2

积分
123
跳转到指定楼层
楼主
发表于 2017-10-10 12:13:53 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
汉枫LPB120模块
机智云官网生成项目后,下载自动生成的 Android 的APP,用Eclipse打开,然后可以编译成功,但是在AVD上运行时提示:"Unfortunately,XXXX has stopped.",将APK安装到手机上运行也是一样,请问是什么原因?下面是Eclipse上打印出的Log:
10-10 02:37:09.346: W/dalvikvm(1058): Unable to resolve superclass of Lcom/gizwits/opensource/appkit/CommonModule/GosBaseActivity; (169)
10-10 02:37:09.396: W/dalvikvm(1058): Link of class 'Lcom/gizwits/opensource/appkit/CommonModule/GosBaseActivity;' failed
10-10 02:37:09.396: W/dalvikvm(1058): Unable to resolve superclass of Lcom/gizwits/opensource/appkit/UserModule/GosUserModuleBaseActivity; (1016)
10-10 02:37:09.396: W/dalvikvm(1058): Link of class 'Lcom/gizwits/opensource/appkit/UserModule/GosUserModuleBaseActivity;' failed
10-10 02:37:09.406: W/dalvikvm(1058): Unable to resolve superclass of Lcom/gizwits/opensource/appkit/UserModule/GosUserLoginActivity; (1172)
10-10 02:37:09.406: W/dalvikvm(1058): Link of class 'Lcom/gizwits/opensource/appkit/UserModule/GosUserLoginActivity;' failed
10-10 02:37:09.406: D/AndroidRuntime(1058): Shutting down VM
10-10 02:37:09.436: W/dalvikvm(1058): threadid=1: thread exiting with uncaught exception (group=0x40a71930)
10-10 02:37:09.496: E/AndroidRuntime(1058): FATAL EXCEPTION: main
10-10 02:37:09.496: E/AndroidRuntime(1058): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.gizwits.opensource.appkit/com.gizwits.opensource.appkit.UserModule.GosUserLoginActivity}: java.lang.ClassNotFoundException: Didn't find class "com.gizwits.opensource.appkit.UserModule.GosUserLoginActivity" on path: /data/app/com.gizwits.opensource.appkit-1.apk
10-10 02:37:09.496: E/AndroidRuntime(1058):         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2106)
10-10 02:37:09.496: E/AndroidRuntime(1058):         at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
10-10 02:37:09.496: E/AndroidRuntime(1058):         at android.app.ActivityThread.access$600(ActivityThread.java:141)
10-10 02:37:09.496: E/AndroidRuntime(1058):         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
10-10 02:37:09.496: E/AndroidRuntime(1058):         at android.os.Handler.dispatchMessage(Handler.java:99)
10-10 02:37:09.496: E/AndroidRuntime(1058):         at android.os.Looper.loop(Looper.java:137)
10-10 02:37:09.496: E/AndroidRuntime(1058):         at android.app.ActivityThread.main(ActivityThread.java:5041)
10-10 02:37:09.496: E/AndroidRuntime(1058):         at java.lang.reflect.Method.invokeNative(Native Method)
10-10 02:37:09.496: E/AndroidRuntime(1058):         at java.lang.reflect.Method.invoke(Method.java:511)
10-10 02:37:09.496: E/AndroidRuntime(1058):         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
10-10 02:37:09.496: E/AndroidRuntime(1058):         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
10-10 02:37:09.496: E/AndroidRuntime(1058):         at dalvik.system.NativeStart.main(Native Method)
10-10 02:37:09.496: E/AndroidRuntime(1058): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.gizwits.opensource.appkit.UserModule.GosUserLoginActivity" on path: /data/app/com.gizwits.opensource.appkit-1.apk
10-10 02:37:09.496: E/AndroidRuntime(1058):         at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:65)
10-10 02:37:09.496: E/AndroidRuntime(1058):         at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
10-10 02:37:09.496: E/AndroidRuntime(1058):         at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
10-10 02:37:09.496: E/AndroidRuntime(1058):         at android.app.Instrumentation.newActivity(Instrumentation.java:1054)
10-10 02:37:09.496: E/AndroidRuntime(1058):         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2097)
10-10 02:37:09.496: E/AndroidRuntime(1058):         ... 11 more
10-10 02:42:09.836: I/Process(1058): Sending signal. PID: 1058 SIG: 9
10-10 02:42:15.205: E/Trace(1223): error opening trace file: No such file or directory (2)
10-10 02:42:15.315: I/dalvikvm(1223): Could not find method cn.jpush.android.service.n.quitSafely, referenced from method cn.jpush.android.service.PushService.onDestroy
10-10 02:42:15.315: W/dalvikvm(1223): VFY: unable to resolve virtual method 3261: Lcn/jpush/android/service/n;.quitSafely ()Z
10-10 02:42:15.315: D/dalvikvm(1223): VFY: replacing opcode 0x6e at 0x0038
10-10 02:42:15.415: D/dalvikvm(1223): Trying to load lib /data/app-lib/com.gizwits.opensource.appkit-1/libjpush215.so 0x40ce3a68
10-10 02:42:15.415: D/dalvikvm(1223): Added shared lib /data/app-lib/com.gizwits.opensource.appkit-1/libjpush215.so 0x40ce3a68
10-10 02:42:15.625: W/JPush(1223): [AndroidUtil] AndroidManifest.xml missing required service: cn.jpush.android.service.DaemonService
10-10 02:42:15.645: D/dalvikvm(1223): GC_CONCURRENT freed 291K, 14% free 2532K/2944K, paused 72ms+21ms, total 170ms
10-10 02:42:15.705: W/dalvikvm(1223): Unable to resolve superclass of Lcom/gizwits/opensource/appkit/CommonModule/GosBaseActivity; (169)
10-10 02:42:15.705: W/dalvikvm(1223): Link of class 'Lcom/gizwits/opensource/appkit/CommonModule/GosBaseActivity;' failed
10-10 02:42:15.705: W/dalvikvm(1223): Unable to resolve superclass of Lcom/gizwits/opensource/appkit/UserModule/GosUserModuleBaseActivity; (1016)
10-10 02:42:15.715: W/dalvikvm(1223): Link of class 'Lcom/gizwits/opensource/appkit/UserModule/GosUserModuleBaseActivity;' failed
10-10 02:42:15.715: W/dalvikvm(1223): Unable to resolve superclass of Lcom/gizwits/opensource/appkit/UserModule/GosUserLoginActivity; (1172)
10-10 02:42:15.715: W/dalvikvm(1223): Link of class 'Lcom/gizwits/opensource/appkit/UserModule/GosUserLoginActivity;' failed
10-10 02:42:15.715: W/JPush(1223): [AndroidUtil] You should make main activity extends InstrumentedActivity (JPush), otherwise you will not see user click and user active time start on report in Portal.
10-10 02:47:06.935: D/dalvikvm(1223): GC_CONCURRENT freed 262K, 13% free 2776K/3160K, paused 74ms+128ms, total 295ms
10-10 02:47:06.935: D/dalvikvm(1223): WAIT_FOR_CONCURRENT_GC blocked 6ms
10-10 02:47:07.245: D/dalvikvm(1223): GC_FOR_ALLOC freed 415K, 21% free 2689K/3392K, paused 47ms, total 49ms
10-10 02:51:55.407: D/dalvikvm(835): GC_CONCURRENT freed 334K, 14% free 3034K/3492K, paused 88ms+3ms, total 179ms

34

主题

896

帖子

2274

积分

超级版主

Rank: 8Rank: 8

积分
2274
沙发
发表于 2017-10-12 10:06:57 | 只看该作者
你编译App之前有对工程进行修改么,编译之前先clean一下项目试试

点评

下载之后没有做任何修改,那些app id,app secret,pk这些值下载的程序中就已经修改了,而且是先clean之后再build的,  详情 回复 发表于 2017-10-12 10:17

3

主题

11

帖子

123

积分

注册会员

Rank: 2

积分
123
板凳
 楼主| 发表于 2017-10-12 10:17:40 | 只看该作者
boboP 发表于 2017-10-12 10:06
你编译App之前有对工程进行修改么,编译之前先clean一下项目试试

下载之后没有做任何修改,那些app id,app secret,pk这些值下载的程序中就已经修改了,而且是先clean之后再build的,

点评

用android studio工程试一下吧,eclipse环境你可能没有完全搭建成功  详情 回复 发表于 2017-10-16 20:34

0

主题

7

帖子

84

积分

注册会员

Rank: 2

积分
84
地板
发表于 2017-10-16 20:34:37 | 只看该作者
sidebyside 发表于 2017-10-12 10:17
下载之后没有做任何修改,那些app id,app secret,pk这些值下载的程序中就已经修改了,而且是先clean之后再b ...

用android studio工程试一下吧,eclipse环境你可能没有完全搭建成功

点评

用Android studio的可以,就是eclipse的不行,刚开始学android,还不太会玩  详情 回复 发表于 2017-10-17 08:59

3

主题

11

帖子

123

积分

注册会员

Rank: 2

积分
123
5#
 楼主| 发表于 2017-10-17 08:59:49 | 只看该作者
注册成为机智云开发者,手机加虚拟设备快速开发
Refon 发表于 2017-10-16 20:34
用android studio工程试一下吧,eclipse环境你可能没有完全搭建成功

用Android studio的可以,就是eclipse的不行,刚开始学android,还不太会玩
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

加入Q群 返回顶部

版权与免责声明 © 2006-2024 Gizwits IoT Technology Co., Ltd. ( 粤ICP备11090211号 )

快速回复 返回顶部 返回列表