a***@gzw1.com
a***@gzw1.com
  • 发布:2023-03-19 14:59
  • 更新:2023-05-05 15:14
  • 阅读:748

切换到新版本3.7.3,调试app自动退出,什么原因

分类:uni-app

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/com.gzw1.mxjappfw-NOBz46RC2CyYRGXRKA8A1g==/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:6)
at io.src.dcloud.adapter.DCloudBaseActivity.onCreate(Unknown Source:14)
at io.dcloud.c.onCreate(Unknown Source:2)
at io.dcloud.b.onCreate(Unknown Source:1)
at io.dcloud.WebAppActivity.onCreate(Unknown Source:22)
at android.app.Activity.performCreate(Activity.java:7383)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1218)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3256)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3411)
at android.app.ActivityThread.-wrap12(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1994)
at android.os.Handler.dispatchMessage(Handler.java:108)
at android.os.Looper.loop(Looper.java:166)
at android.app.ActivityThread.main(ActivityThread.java:7529)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)

2023-03-19 14:59 负责人:无 分享
已邀请:
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

要回复问题请先登录注册