1***@qq.com
1***@qq.com
  • 发布:2021-03-13 14:29
  • 更新:2021-06-12 07:59
  • 阅读:939

Didn't find class "io.dcloud.feature.ui.UIFeatureImpl"

分类:uni-app

Android studio上提示错误如下:

03-13 14:09:30.647 29481-29481/com.gcsoft.vpnplugin W/System.err: java.lang.ClassNotFoundException: io.dcloud.feature.ui.UIFeatureImpl
03-13 14:09:30.647 29481-29481/com.gcsoft.vpnplugin W/System.err: at java.lang.Class.classForName(Native Method)
03-13 14:09:30.647 29481-29481/com.gcsoft.vpnplugin W/System.err: at java.lang.Class.forName(Class.java:324)
03-13 14:09:30.647 29481-29481/com.gcsoft.vpnplugin W/System.err: at java.lang.Class.forName(Class.java:285)
03-13 14:09:30.647 29481-29481/com.gcsoft.vpnplugin W/System.err: at io.dcloud.m.b.q(:27)
03-13 14:09:30.647 29481-29481/com.gcsoft.vpnplugin W/System.err: at io.dcloud.m.b.l(:118)
03-13 14:09:30.647 29481-29481/com.gcsoft.vpnplugin W/System.err: at io.dcloud.m.b.s(:3)
03-13 14:09:30.647 29481-29481/com.gcsoft.vpnplugin W/System.err: at io.dcloud.m.b.a(:144)
03-13 14:09:30.647 29481-29481/com.gcsoft.vpnplugin W/System.err: at io.dcloud.j.b.c.c(:22)
03-13 14:09:30.647 29481-29481/com.gcsoft.vpnplugin W/System.err: at io.dcloud.g.d.b.p.a(:2)
03-13 14:09:30.647 29481-29481/com.gcsoft.vpnplugin W/System.err: at io.dcloud.g.d.b.k.b(:10)
03-13 14:09:30.647 29481-29481/com.gcsoft.vpnplugin W/System.err: at io.dcloud.g.d.b.k$a.a(:5)
03-13 14:09:30.647 29481-29481/com.gcsoft.vpnplugin W/System.err: at io.dcloud.g.b.b.m$a.handleMessage(:3)
03-13 14:09:30.647 29481-29481/com.gcsoft.vpnplugin W/System.err: at android.os.Handler.dispatchMessage(Handler.java:102)
03-13 14:09:30.647 29481-29481/com.gcsoft.vpnplugin W/System.err: at android.os.Looper.loop(Looper.java:148)
03-13 14:09:30.647 29481-29481/com.gcsoft.vpnplugin W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5619)
03-13 14:09:30.647 29481-29481/com.gcsoft.vpnplugin W/System.err: at java.lang.reflect.Method.invoke(Native Method)
03-13 14:09:30.647 29481-29481/com.gcsoft.vpnplugin W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:853)
03-13 14:09:30.647 29481-29481/com.gcsoft.vpnplugin W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:737)
03-13 14:09:30.647 29481-29481/com.gcsoft.vpnplugin W/System.err: Caused by: java.lang.ClassNotFoundException: Didn't find class "io.dcloud.feature.ui.UIFeatureImpl" on path: DexPathList[[zip file "/data/app/com.gcsoft.vpnplugin-2/base.apk"],nativeLibraryDirectories=[/data/app/com.gcsoft.vpnplugin-2/lib/arm, /data/app/com.gcsoft.vpnplugin-2/base.apk!/lib/armeabi-v7a, /vendor/lib, /system/lib]]

手机上提示如下:
当前环境无法运行启用“自定义组件模块”的uni-app应用
打包时未添加ui模块,......

请问是什么问题导致的。

2021-03-13 14:29 负责人:DCloud_App_Array 分享
已邀请:
9***@qq.com

9***@qq.com

同问

长方体移动师

长方体移动师 - 一个奇葩的程序员

是android打包的时候设置混淆的问题。
两个办法(你试试):

  1. 将离线打包提供的 \UniPlugin-Hello-AS\app\proguard-rules.pro 代码复制到你的 app\proguard-rules.pro里面,重新编译
    2.将你的app\build.gradle中的minifyEnabled设置为false,重新编译
  • 9***@qq.com

    谢谢,现在可以了

    2021-06-28 20:23

该问题目前已经被锁定, 无法添加新回复