DCloud_App_Array
DCloud_App_Array
  • 发布:2018-04-16 17:09
  • 更新:2021-06-29 08:55
  • 阅读:105110

使用新版本5+SDK创建最简Android原生工程(Android studio)

分类:5+ SDK

要回复文章请先登录注册

l***@163.com

l***@163.com

离线打包,真机运行,android7.0 可以正常真机运行调试,android8.1 报错,报错内容:
java.lang.RuntimeException: Unable to instantiate application io.dcloud.application.DCloudApplication: java.lang.ClassNotFoundException: Didn't find class "io.dcloud.application.DCloudApplication" on path: DexPathList[[zip file "/data/app/com.bituex.exchange-liAjhp2UGxco-GQbMbF5Cg==/base.apk"],nativeLibraryDirectories=[/data/app/com.bituex.exchange-liAjhp2UGxco-GQbMbF5Cg==/lib/arm64, /data/app/com.bituex.exchange-liAjhp2UGxco-GQbMbF5Cg==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
at android.app.LoadedApk.makeApplication(LoadedApk.java:1046)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6125)
at android.app.ActivityThread.-wrap1(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1839)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:197)
at android.app.ActivityThread.main(ActivityThread.java:7022)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:515)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:837)
Caused by: java.lang.ClassNotFoundException: Didn't find class "io.dcloud.application.DCloudApplication" on path: DexPathList[[zip file "/data/app/com.bituex.exchange-liAjhp2UGxco-GQbMbF5Cg==/base.apk"],nativeLibraryDirectories=[/data/app/com.bituex.exchange-liAjhp2UGxco-GQbMbF5Cg==/lib/arm64, /data/app/com.bituex.exchange-liAjhp2UGxco-GQbMbF5Cg==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.app.Instrumentation.newApplication(Instrumentation.java:1088)
at android.app.LoadedApk.makeApplication(LoadedApk.java:1040)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6125) 
at android.app.ActivityThread.-wrap1(Unknown Source:0) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1839) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:197) 
at android.app.ActivityThread.main(ActivityThread.java:7022) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:515) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:837) 
2019-08-05 11:14
龙在江湖

龙在江湖

compile(name: 'lib.5plus.base-release', ext: 'aar') 出现: WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' , 请问大家有出现这个问题吗,如何处理呢?
2019-07-24 12:00
1***@163.com

1***@163.com

停在启动页或白屏问题总结,避免大家踩坑:
1.确保打包资源放在目录 apps/x目录/www下,“x目录”命名、manifest.json文件中的appid、assets/data/dcloud_control.xml中的appid,三者的值一样
2.在build.gradle文件的android节点下添加下面代码:
defaultConfig{
........
multiDexEnabled true
ndk {
abiFilters 'x86','armeabi' //使用uniapp时必须同时选择二者或选其一
}
}

aaptOptions {
additionalParameters '--auto-add-overlay'
//noCompress 'foo', 'bar'
ignoreAssetsPattern "!.svn:!.git:.*:!CVS:!thumbs.db:!picasa.ini:!*.scc:*~"
}
3.引入依赖uniapp-release.aar:将下载到的SDK/libs目录下的uniapp-release.aar复制到工程的app/libs目录
4.在build.gradle文件的dependencies节点添加:
implementation fileTree(include: ['*.aar'], dir: 'libs')
/*uniapp所需库-----------------------开始*/
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'com.alibaba.android:bindingx-core:1.0.3'
implementation 'com.alibaba.android:bindingx_weex_plugin:1.0.3'
implementation 'com.squareup.okhttp:okhttp:2.3.0'
implementation 'com.squareup.okhttp:okhttp-ws:2.3.0'
implementation 'com.alibaba:fastjson:1.1.46.android'
implementation 'com.facebook.fresco:fresco:0.12.0'
/*uniapp所需库-----------------------结束*/
// 基座需要,必须添加
implementation 'com.github.bumptech.glide:glide:4.9.0'
5.保持Androidmanifest.xml下的manifest节点中的package属性与build.gradle中的applicationId一致
2019-06-19 11:36
t***@163.com

t***@163.com

没有友盟统计的示例啊
2019-06-17 20:27
2***@qq.com

2***@qq.com

添加集成uni-app的依赖后,一直提示“Unable to resolve dependency for”,怎么解决
2019-06-14 15:41
zerefsong

zerefsong

打包时未添加videoplayer模块 怎么配置
2019-06-01 15:05
1***@163.com

1***@163.com

回复 1***@qq.com :
你在Hbuilderx里面的App启动图配置项 不要勾选前两项就不转圈了
2019-05-22 16:45
HiDong

HiDong

打开后一直转圈圈,不能进入程序,怎么回事啊
2019-05-18 01:41
6***@163.com

6***@163.com

回复 1***@163.com :
没法截图,选project这种视图,在app目录下,有一个build.gradle文件,在这个文件修改就好
2019-05-15 21:05
1***@163.com

1***@163.com

回复 2***@qq.com :
app.builder是哪个?我怎么找不到?你说的停留在splash页面是启动页完了以后闪白屏的情况吗?
2019-05-15 16:54