应用研发平台EMAS报错java.lang.NoClassDefFoundError: Failed resolution of: Lcom/huawei/hms/common/ApiException; 华为手机,怎么解决?
uniapp 接入阿里推送插件 华为鸿蒙3.0 真机 应用启动 后 闪退 报错如下
2024-07-15 17:41:05.079 19704-19896 hwbr_engin...eiKeystore cigar.jjw.com.cigarvip I getSecretKeyFromKeystore: Android KeyStore Access Success
2024-07-15 17:41:05.088 19704-19896 hwbr_engin...eiKeystore cigar.jjw.com.cigarvip E Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'javax.crypto.SecretKey java.security.KeyStore$SecretKeyEntry.getSecretKey()' on a null object reference
2024-07-15 17:41:05.132 19704-19896 hwbr_engin...eiKeystore cigar.jjw.com.cigarvip I HuaweiKeystore generate new keystore.
2024-07-15 17:41:05.135 19704-20048 System.err cigar.jjw.com.cigarvip W java.lang.NoClassDefFoundError: Failed resolution of: Lcom/huawei/hms/common/ApiException;
2024-07-15 17:41:05.135 19704-20048 System.err cigar.jjw.com.cigarvip W at com.alibaba.sdk.android.push.huawei.HuaWeiRegister$2.run(HuaWeiRegister.java:91)
2024-07-15 17:41:05.135 19704-20048 System.err cigar.jjw.com.cigarvip W at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
2024-07-15 17:41:05.135 19704-20048 System.err cigar.jjw.com.cigarvip W at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
2024-07-15 17:41:05.135 19704-20048 System.err cigar.jjw.com.cigarvip W at java.lang.Thread.run(Thread.java:929)
2024-07-15 17:41:05.135 19704-20048 System.err cigar.jjw.com.cigarvip W Caused by: java.lang.ClassNotFoundException: com.huawei.hms.common.ApiException
2024-07-15 17:41:05.135 19704-20048 System.err cigar.jjw.com.cigarvip W ... 4 more
2024-07-15 17:41:05.135 19704-20048 UncaughtEx...ionHandler cigar.jjw.com.cigarvip E java.lang.NoClassDefFoundError: Failed resolution of: Lcom/huawei/hms/common/ApiException;
2024-07-15 17:41:05.135 19704-20048 Process cigar.jjw.com.cigarvip I Sending signal. PID: 19704 SIG: 9
2024-07-15 17:41:05.218 1762-2010 InputDispatcher system_server E channel '9d3e009 cigar.jjw.com.cigarvip/io.dcloud.PandoraEntryActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
2024-07-15 17:41:05.287 3411-4056 DollieAdapterService com.huawei.systemserver E notifyActivityState pkg:cigar.jjw.com.cigarvip/io.dcloud.PandoraEntryActivity state:20 fg:false mUid:10510
使用的是云端插件 建议使用 https://ext.dcloud.net.cn/plugin?id=7628 验证一下,另外uniapp 移动插件使用场景目前不支持不支持离线打包。
此回答整理自钉群“应用研发平台EMAS开发者交流群”
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。