b***@qq.com
b***@qq.com
  • 发布:2023-03-06 19:32
  • 更新:2023-05-05 15:13
  • 阅读:536

安卓集成后,点击打开内置小程序,崩溃了

分类:uni-app

FATAL EXCEPTION: main
Process: com.example.wgt_test:unimp0, PID: 10959
java.lang.NoSuchMethodError: No static method setDefaultTypeKey(Ljava/lang/String;)V in class Lcom/alibaba/fastjson/JSON; or its super classes (declaration of 'com.alibaba.fastjson.JSON' appears in /data/app/~~cqFx4LjVB-XSL1jtpNI7BQ==/com.example.wgt_test-2pwDlxiLIwWf7c1wsUwrKw==/base.apk)
at io.dcloud.feature.weex.WeexInstanceMgr.initWeexEnv(WeexInstanceMgr.java:189)
at io.dcloud.feature.weex.WeexInstanceMgr.initWeexEnv(WeexInstanceMgr.java:169)
at io.dcloud.common.util.AppRuntime.initWeex(Unknown Source:3)
at io.dcloud.application.DCLoudApplicationImpl.onCreate(Unknown Source:32)
at io.dcloud.application.DCLoudApplicationImpl.init(Unknown Source:8)
at io.dcloud.feature.unimp.DCUniMPService.onCreateImpl(Unknown Source:1)
at io.src.dcloud.adapter.DCloudBaseService.onCreate(Unknown Source:2)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:4560)
at android.app.ActivityThread.access$100(ActivityThread.java:309)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2217)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:264)
at android.app.ActivityThread.main(ActivityThread.java:8315)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:632)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1049)

2023-03-06 19:32 负责人:无 分享
已邀请:
9***@qq.com

9***@qq.com

我更新到3.7.11还是存在这个问题

java.lang.NoSuchMethodError: No static method setDefaultTypeKey(Ljava/lang/String;)V in class Lcom/alibaba/fastjson/JSON; or its super classes (declaration of 'com.alibaba.fastjson.JSON' appears in /data/app/app.lehai.scmpad-M_m5iv4lZy2Ntx8lDtEDAg==/base.apk)
at io.dcloud.feature.weex.WeexInstanceMgr.initWeexEnv(WeexInstanceMgr.java:193)
at io.dcloud.feature.weex.WeexInstanceMgr.initWeexEnv(WeexInstanceMgr.java:171)
at io.dcloud.common.util.AppRuntime.initWeex(Unknown Source:3)
at io.dcloud.application.DCLoudApplicationImpl.onCreate(Unknown Source:32)
at io.dcloud.application.DCloudApplication.onCreate(Unknown Source:2)
at app.lehai.scmpad.LehaiApp.onCreate(LehaiApp.java:32)

public class LehaiApp extends DCloudApplication {  
    public static final String TAG = BuildConfig.APPLICATION_ID;  
    private static Context sContext;  
    public static Context getContext() {  
        if (sContext != null) {  
            return sContext;  
        } else {  
            throw new NullPointerException("u should init first");  
        }  
    }  
    @Override  
    public void onCreate() {  
        super.onCreate();  
        sContext = getApplicationContext();  
    }  
}
DCloud_Android_ST

DCloud_Android_ST

缺少依赖 mplementation 'com.alibaba:fastjson:1.2.83' //必须集成,fastjson功能需要

文档:https://nativesupport.dcloud.net.cn/UniMPDocs/UseSdk/android.html

要回复问题请先登录注册