Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

无法启动APP #20

Closed
ybADMIN opened this issue Nov 22, 2016 · 22 comments
Closed

无法启动APP #20

ybADMIN opened this issue Nov 22, 2016 · 22 comments

Comments

@ybADMIN
Copy link

ybADMIN commented Nov 22, 2016

友盟中的类无法找到 我没有做混淆如将分包插件关闭可以正常启动应用这个是怎么回事呢
Could not find class 'com.taobao.accs.utl.h$a', referenced from method com.taobao.accs.internal.ACCSManagerImpl.bindApp Could not find class 'com.ut.mini.internal.UTOriginalCustomHitBuilder', referenced from method com.taobao.accs.utl.UTMini.commitEvent
环信也报错
'com.hyphenate.chat.EMCallManager', referenced from method com.hyphenate.chat.EMClient.callManager

@TangXiaoLv
Copy link
Owner

@ybADMIN 这应该是兼容性问题,你的手机系统,gradle 版本是什么

@ybADMIN
Copy link
Author

ybADMIN commented Nov 22, 2016

2.2.0

@ybADMIN
Copy link
Author

ybADMIN commented Nov 22, 2016

谢谢你的回答,我都折腾很久了

@ybADMIN
Copy link
Author

ybADMIN commented Nov 22, 2016

不过 我把 环信和友盟都注释掉就不会报错

@TangXiaoLv
Copy link
Owner

@ybADMIN 你的分包配置看下

@ybADMIN
Copy link
Author

ybADMIN commented Nov 22, 2016

-just activity com.huanmedia.mvp.ui.GuideActivity.class
-just activity com.huanmedia.mvp.ui.main.MainActivity.class
-keep com.huanmedia.mvp.ui.main.fragment.**
-keep com.umeng.message.**
-keep com.taobao.**
-keep anet.channel.**
-keep com.ut.mini.**
-keep com.hyphenate.**
-keep android.content.**
-keep com.huanmedia.common.**
#-keep android.support.v7.app.AppCompatDialogFragment.class
#-keep com.huanmedia.mvp.ui.FirstGuideFragment.class
#-keep com.huanmedia.mvp.ui.GuideFragment.class
#-split android.support.v?.**
-split .
#-donot-use-suggest
-dex-param --set-max-idx-number=50000
#-auto-maindex
-log-mainlist`

@TangXiaoLv
Copy link
Owner

@ybADMIN
1:-just activity com.huanmedia.yourchum.mvp.ui.GuideActivity 把.class去掉试试
2: 你的main dex 方法数有多少?是否接近50000

@ybADMIN
Copy link
Author

ybADMIN commented Nov 22, 2016

好的 我试试,方法差不多40000

@ybADMIN
Copy link
Author

ybADMIN commented Nov 22, 2016

不行,我把环信sdk调用方法注释后就可以正常使用了
不过我要接入环信这就有点麻烦了

@ybADMIN
Copy link
Author

ybADMIN commented Nov 22, 2016

`11-22 18:28:28.275 2737-2737/? A/DEBUG: pid: 2664, tid: 2736, name: Thread-3 >>> com.huanmedia.debug <<<
11-22 18:28:28.282 2737-2737/? A/DEBUG: #4 pc 000000000011fdcc /data/app/com.huanmedia.debug-1/lib/arm64/libhyphenate.so (_ZN9__gnu_cxx27__verbose_terminate_handlerEv+348)
11-22 18:28:28.282 2737-2737/? A/DEBUG: #5 pc 00000000000cfbf0 /data/app/com.huanmedia.debug-1/lib/arm64/libhyphenate.so (_ZN10__cxxabiv111__terminateEPFvvE+8)
11-22 18:28:28.282 2737-2737/? A/DEBUG: #6 pc 00000000000cfc5c /data/app/com.huanmedia.debug-1/lib/arm64/libhyphenate.so (_ZSt9terminatev+12)
11-22 18:28:28.282 2737-2737/? A/DEBUG: #7 pc 000000000011efb8 /data/app/com.huanmedia.debug-1/lib/arm64/libhyphenate.so (__cxa_throw+136)
11-22 18:28:28.282 2737-2737/? A/DEBUG: #8 pc 0000000000115d64 /data/app/com.huanmedi.debug-1/lib/arm64/libhyphenate.so
11-22 18:28:28.282 2737-2737/? A/DEBUG: #9 pc 0000000000119834 /data/app/com.huanmedia.debug-1/lib/arm64/libhyphenate.so
11-22 18:28:28.282 2737-2737/? A/DEBUG: #10 pc 000000000005db30 /data/app/com.huanmedia.debug-1/lib/arm64/libhyphenate.so
11-22 18:28:28.282 2737-2737/? A/DEBUG: #11 pc 00000000000cd8b0 /data/app/com.huanmedia.debug-1/lib/arm64/libhyphenate.so (Java_com_hyphenate_chat_adapter_EMAChatConfig_nativegetBaseUrl+56)
11-22 18:28:28.282 2737-2737/? A/DEBUG: #12 pc 0000000000a7a2f0 /data/app/com.huanmedia.debug-1/oat/arm64/base.odex (offset 0xa2a000)11-22 18:28:28.275 2737-2737/? A/DEBUG: pid: 2664, tid: 2736, name: Thread-3 >>>

@TangXiaoLv
Copy link
Owner

@ybADMIN 你把环信的包keep下 试试

@ybADMIN
Copy link
Author

ybADMIN commented Nov 22, 2016

已经keep了,我也没做混淆

@ybADMIN
Copy link
Author

ybADMIN commented Nov 22, 2016

你好,上边的问题莫名其妙的弄好了,可是打包混淆后:

java.lang.ClassNotFoundException: Didn't find class "com.huanmedia.common.base.BaseApplication"

@ybADMIN
Copy link
Author

ybADMIN commented Nov 22, 2016

各种类找不到,是不是我有什么地方没有配置正确呢

@TangXiaoLv
Copy link
Owner

@ybADMIN 混淆后会自动根据mapping过滤,检查下非打开分包情况下,混淆是否成功

@ybADMIN
Copy link
Author

ybADMIN commented Nov 22, 2016

好的

@ybADMIN
Copy link
Author

ybADMIN commented Nov 22, 2016

不对,我再nexus 5x 上可以正常运行,在锤子t1上不能运行直接闪退,原因是混淆后的包都早不到了

@ybADMIN
Copy link
Author

ybADMIN commented Nov 22, 2016

nexus 是7.0系统,t1是4.4系统

@ybADMIN
Copy link
Author

ybADMIN commented Nov 22, 2016

非分包情况下是可以正常运行的,两个系统版本都可以,这是不是插件兼容性问题呢

@TangXiaoLv
Copy link
Owner

@ybADMIN 应该是,跟gradle版本关系也很大,gradle版本变化太快了

@ybADMIN
Copy link
Author

ybADMIN commented Nov 22, 2016

我现在用的是2.2.0版本,用什么版本才能成功呢?

@ybADMIN
Copy link
Author

ybADMIN commented Nov 22, 2016

还有个就是,我的项目编译的时候有很多警告,是内部类问题,这些警告会不会有关系?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants