Anet
Anet
  • 发布:2022-11-30 15:01
  • 更新:2024-02-01 15:55
  • 阅读:2035

哪位大佬帮忙看一下Android离线配置问题,谢谢!

分类:uni-app

离线SDK版本:2022年11月14日发布——HBuilderX(3.6.9.20221114-alpha)

提示是说缺少了 io.dcloud.uts.android.AndroidUTSContext ,但是不知道要配置什么内容。

D/WebAppActivity: onCreate  
W/System.err: java.lang.ClassNotFoundException: io.dcloud.common.util.net.http.LocalServer2  
W/System.err:     at java.lang.Class.classForName(Native Method)  
W/System.err:     at java.lang.Class.forName(Class.java:454)  
W/System.err:     at java.lang.Class.forName(Class.java:379)  
W/System.err:     at io.dcloud.common.ui.b.c(Unknown Source:1)  
W/System.err:     at io.dcloud.b.onCreate(Unknown Source:8)  
W/System.err:     at io.dcloud.WebAppActivity.onCreate(Unknown Source:24)  
W/System.err:     at android.app.Activity.performCreate(Activity.java:7963)  
W/System.err:     at android.app.Activity.performCreate(Activity.java:7952)  
W/System.err:     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1307)  
W/System.err:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3629)  
W/System.err:     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3806)  
W/System.err:     at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)  
W/System.err:     at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)  
W/System.err:     at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)  
W/System.err:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2267)  
W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:107)  
W/System.err:     at android.os.Looper.loop(Looper.java:237)  
W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:8167)  
W/System.err:     at java.lang.reflect.Method.invoke(Native Method)  
W/System.err:     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)  
W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)  
W/System.err: Caused by: java.lang.ClassNotFoundException: Didn't find class "io.dcloud.common.util.net.http.LocalServer2" on path: DexPathList[[zip file "/data/app/com.deftship.app-OPrKoAdE2SXhvVA6t3R3mg==/base.apk"],nativeLibraryDirectories=[/data/app/com.deftship.app-OPrKoAdE2SXhvVA6t3R3mg==/lib/arm64, /data/app/com.deftship.app-OPrKoAdE2SXhvVA6t3R3mg==/base.apk!/lib/arm64-v8a, /system/lib64]]  
W/System.err:     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196)  
W/System.err:     at java.lang.ClassLoader.loadClass(ClassLoader.java:379)  
W/System.err:     at java.lang.ClassLoader.loadClass(ClassLoader.java:312)  
W/System.err:   ... 21 more  
W/om.deftship.ap: Accessing hidden field Ldalvik/system/BaseDexClassLoader;->pathList:Ldalvik/system/DexPathList; (greylist, JNI, allowed)  
W/om.deftship.ap: Accessing hidden field Ldalvik/system/DexPathList;->dexElements:[Ldalvik/system/DexPathList$Element; (greylist, JNI, allowed)  
W/om.deftship.ap: Accessing hidden field Ldalvik/system/DexPathList$Element;->dexFile:Ldalvik/system/DexFile; (greylist, JNI, allowed)  
W/om.deftship.ap: Accessing hidden field Ldalvik/system/DexFile;->mFileName:Ljava/lang/String; (greylist, JNI, allowed)  
I/WebViewFactory: Loading com.google.android.webview version 107.0.5304.141 (code 530414133)  
W/linker: Warning: "/data/app/com.google.android.webview-wAOitZKpviUVPQPnHoqXLw==/base.apk!/lib/arm64-v8a/libmonochrome.so" unused DT entry: unknown processor-specific (type 0x70000001 arg 0x0) (ignoring)  
W/om.deftship.ap: Accessing hidden method Landroid/os/Trace;->isTagEnabled(J)Z (greylist, reflection, allowed)  
W/om.deftship.ap: Accessing hidden method Landroid/os/Trace;->traceBegin(JLjava/lang/String;)V (greylist, reflection, allowed)  
W/om.deftship.ap: Accessing hidden method Landroid/os/Trace;->traceEnd(J)V (greylist, reflection, allowed)  
W/om.deftship.ap: Accessing hidden method Landroid/os/Trace;->asyncTraceBegin(JLjava/lang/String;I)V (greylist, reflection, allowed)  
W/om.deftship.ap: Accessing hidden method Landroid/os/Trace;->asyncTraceEnd(JLjava/lang/String;I)V (greylist, reflection, allowed)  
I/cr_WVCFactoryProvider: Loaded version=107.0.5304.141 minSdkVersion=29 isBundle=true multiprocess=true packageId=2  
I/cr_LibraryLoader: Successfully loaded native library  
I/cr_CachingUmaRecorder: Flushed 8 samples from 8 histograms.  
W/System.err: java.lang.ClassNotFoundException: io.dcloud.uts.android.AndroidUTSContext  
W/System.err:     at java.lang.Class.classForName(Native Method)  
W/System.err:     at java.lang.Class.forName(Class.java:454)  
W/System.err:     at java.lang.Class.forName(Class.java:379)  
W/System.err:     at io.dcloud.common.util.AppRuntime.initUTS(Unknown Source:1)  
W/System.err:     at io.dcloud.b$g.a(Unknown Source:8)  
W/System.err:     at io.dcloud.common.ui.b.a(Unknown Source:363)  
W/System.err:     at io.dcloud.b.onCreate(Unknown Source:64)  
W/System.err:     at io.dcloud.WebAppActivity.onCreate(Unknown Source:24)  
W/System.err:     at android.app.Activity.performCreate(Activity.java:7963)  
W/System.err:     at android.app.Activity.performCreate(Activity.java:7952)  
W/System.err:     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1307)  
W/System.err:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3629)  
W/System.err:     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3806)  
W/System.err:     at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)  
W/System.err:     at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)  
W/System.err:     at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)  
W/System.err:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2267)  
W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:107)  
W/System.err:     at android.os.Looper.loop(Looper.java:237)  
W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:8167)  
W/System.err:     at java.lang.reflect.Method.invoke(Native Method)  
W/System.err:     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)  
W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)  
W/System.err: Caused by: java.lang.ClassNotFoundException: Didn't find class "io.dcloud.uts.android.AndroidUTSContext" on path: DexPathList[[zip file "/data/app/com.deftship.app-OPrKoAdE2SXhvVA6t3R3mg==/base.apk"],nativeLibraryDirectories=[/data/app/com.deftship.app-OPrKoAdE2SXhvVA6t3R3mg==/lib/arm64, /data/app/com.deftship.app-OPrKoAdE2SXhvVA6t3R3mg==/base.apk!/lib/arm64-v8a, /system/lib64]]  
W/System.err:     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196)  
W/System.err:     at java.lang.ClassLoader.loadClass(ClassLoader.java:379)  
W/System.err:     at java.lang.ClassLoader.loadClass(ClassLoader.java:312)  
W/System.err:   ... 23 more  
W/System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.reflect.Field java.lang.Class.getField(java.lang.String)' on a null object reference  
W/System.err:     at io.dcloud.common.util.AppRuntime.initUTS(Unknown Source:9)  
W/System.err:     at io.dcloud.b$g.a(Unknown Source:8)  
W/System.err:     at io.dcloud.common.ui.b.a(Unknown Source:363)  
W/System.err:     at io.dcloud.b.onCreate(Unknown Source:64)  
W/System.err:     at io.dcloud.WebAppActivity.onCreate(Unknown Source:24)  
W/System.err:     at android.app.Activity.performCreate(Activity.java:7963)  
W/System.err:     at android.app.Activity.performCreate(Activity.java:7952)  
W/System.err:     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1307)  
W/System.err:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3629)  
W/System.err:     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3806)  
W/System.err:     at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)  
W/System.err:     at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)  
W/System.err:     at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)  
W/System.err:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2267)  
W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:107)  
W/System.err:     at android.os.Looper.loop(Looper.java:237)  
W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:8167)  
W/System.err:     at java.lang.reflect.Method.invoke(Native Method)  
W/System.err:     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)  
W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)  
D/download_manager: BaseActivity onCreate  
2022-11-30 15:01 负责人:无 分享
已邀请:
appwociao

appwociao

遇到同样的问题,最新的3.6.15 sdk

z***@gyb56.com

z***@gyb56.com

同样的问题,SDK 里的示例工程都跑不起来啊

2***@qq.com

2***@qq.com

示例工程都跑不起来,他么的

yangjw

yangjw

同样的问题 3.6.15,解决了吗

Anet

Anet (作者)

没有,重新撸了一遍另外一个版本的,提示appkey配置错误,就放弃了

l***@163.com

l***@163.com

遇到相同的问题,求解

z***@126.com

z***@126.com

大佬怎么解决的,解决了吗?有方案吗?还是升级了SDK,使用最新SDK了吗?

8***@qq.com

8***@qq.com

遇到相同的问题,求解

x***@126.com

x***@126.com

没人能够解决吗?

1***@qq.com

1***@qq.com

W/System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.reflect.Field java.lang.Class.getField(java.lang.String)' on a null object reference  
W/System.err:     at io.dcloud.common.util.AppRuntime.initUTS(Unknown Source)  
W/System.err:     at io.dcloud.b$g.a(Unknown Source)  
W/System.err:     at io.dcloud.common.ui.b$a.a(Unknown Source)  
W/System.err:     at io.dcloud.common.ui.a$c$a.onClick(Unknown Source)  
W/System.err:     at android.view.View.performClick(View.java:5692)  
W/System.err:     at android.view.View$PerformClick.run(View.java:22626)  
W/System.err:     at android.os.Handler.handleCallback(Handler.java:751)  
W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:95)  
W/System.err:     at android.os.Looper.loop(Looper.java:154)  
W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:6441)  
W/System.err:     at java.lang.reflect.Method.invoke(Native Method)  
W/System.err:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:939)  
W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:829)

一样的问题,3.7.9 没有人解决吗?

前端V威哥

前端V威哥 - 前端进阶之路

我是检测到红米机子会出现这个报错。其他机型不会

s***@outlook.com

s***@outlook.com

一样的问题,有啥办法吗
2023-11-02 10:45:56.633 26642-26642 System.err com.android.simple W java.lang.ClassNotFoundException: io.dcloud.common.util.net.http.LocalServer2
2023-11-02 10:45:56.634 26642-26642 System.err com.android.simple W at java.lang.Class.classForName(Native Method)
2023-11-02 10:45:56.634 26642-26642 System.err com.android.simple W at java.lang.Class.forName(Class.java:454)
2023-11-02 10:45:56.634 26642-26642 System.err com.android.simple W at java.lang.Class.forName(Class.java:379)
2023-11-02 10:45:56.634 26642-26642 System.err com.android.simple W at io.dcloud.common.ui.b.c(Unknown Source:1)
2023-11-02 10:45:56.634 26642-26642 System.err com.android.simple W at io.dcloud.b.onCreate(Unknown Source:8)
2023-11-02 10:45:56.634 26642-26642 System.err com.android.simple W at io.dcloud.WebAppActivity.onCreate(Unknown Source:22)
2023-11-02 10:45:56.634 26642-26642 System.err com.android.simple W at android.app.Activity.performCreate(Activity.java:7995)
2023-11-02 10:45:56.635 26642-26642 System.err com.android.simple W at android.app.Activity.performCreate(Activity.java:7979)
2023-11-02 10:45:56.635 26642-26642 System.err com.android.simple W at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
2023-11-02 10:45:56.635 26642-26642 System.err com.android.simple W at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3422)
2023-11-02 10:45:56.635 26642-26642 System.err com.android.simple W at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601)
2023-11-02 10:45:56.635 26642-26642 System.err com.android.simple W at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
2023-11-02 10:45:56.635 26642-26642 System.err com.android.simple W at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
2023-11-02 10:45:56.635 26642-26642 System.err com.android.simple W at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
2023-11-02 10:45:56.635 26642-26642 System.err com.android.simple W at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
2023-11-02 10:45:56.635 26642-26642 System.err com.android.simple W at android.os.Handler.dispatchMessage(Handler.java:106)
2023-11-02 10:45:56.635 26642-26642 System.err com.android.simple W at android.os.Looper.loop(Looper.java:223)
2023-11-02 10:45:56.635 26642-26642 System.err com.android.simple W at android.app.ActivityThread.main(ActivityThread.java:7656)
2023-11-02 10:45:56.635 26642-26642 System.err com.android.simple W at java.lang.reflect.Method.invoke(Native Method)
2023-11-02 10:45:56.635 26642-26642 System.err com.android.simple W at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
2023-11-02 10:45:56.635 26642-26642 System.err com.android.simple W at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
2023-11-02 10:45:56.636 26642-26642 System.err com.android.simple W Caused by: java.lang.ClassNotFoundException: Didn't find class "io.dcloud.common.util.net.http.LocalServer2" on path: DexPathList[[zip file "/data/app/wRdJ0hXiXCmvrw35XcjMpw==/com.android.simple-Ylw4c32bEh3b84yuncbw2w==/base.apk"],nativeLibraryDirectories=[/data/app/wRdJ0hXiXCmvrw35XcjMpw==/com.android.simple-Ylw4c32bEh3b84yuncbw2w==/lib/x86, /data/app/~~wRdJ0hXiXCmvrw35XcjMpw==/com.android.simple-Ylw4c32bEh3b84yuncbw2w==/base.apk!/lib/x86, /system/lib, /system_ext/lib, /product/lib]]
2023-11-02 10:45:56.636 26642-26642 System.err com.android.simple W at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:207)
2023-11-02 10:45:56.637 26642-26642 System.err com.android.simple W at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
2023-11-02 10:45:56.637 26642-26642 System.err com.android.simple W at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
2023-11-02 10:45:56.637 26642-26642 System.err com.android.simple W ... 21 more
2023-11-02 10:45:56.672 26642-26642 .android.simpl com.android.simple W Accessing hidden field Ldalvik/system/BaseDexClassLoader;->pathList:Ldalvik/system/DexPathList; (greylist, JNI, allowed)
2023-11-02 10:45:56.672 26642-26642 .android.simpl com.android.simple W Accessing hidden field Ldalvik/system/DexPathList$Element;->dexFile:Ldalvik/system/DexFile; (greylist, JNI, allowed)
2023-11-02 10:45:56.672 26642-26642 .android.simpl com.android.simple W Accessing hidden field Ldalvik/system/DexFile;->mFileName:Ljava/lang/String; (greylist, JNI, allowed)
2023-11-02 10:45:56.830 26642-26642 WebViewFactory com.android.simple I Loading com.google.android.webview version 83.0.4103.101 (code 410410181)

j***@qq.com

j***@qq.com

升级gradle到8.1.2之后就出现了如下错误
arm64-v8a/libmonochrome_64.so" unused DT entry: unknown processor-specific

rainbow57

rainbow57 - 向大前端进发的攻城狮

离线打包没看到官方的技术支持?

x***@163.com

x***@163.com

示例工程同样遇到这个问题了

白鹭残暑

白鹭残暑 - ^ ^

我自己新建一个了一个项目离线打包成功了,实例工程这个报错不懂是啥

要回复问题请先登录注册