02-18 16:51:49.984 26783-26879/com.baidu.tts.sample E/AndroidRuntime: FATAL EXCEPTION: Thread-9
Process: com.baidu.tts.sample, PID: 26783
java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/message/BasicNameValuePair;
at com.baidu.tts.e.a.c(StatHelper.java:192)
at com.baidu.tts.e.a.a(StatHelper.java:154)
at com.baidu.tts.e.a.b(StatHelper.java:130)
at com.baidu.tts.e.a.a(StatHelper.java:88)
at com.baidu.tts.e.b.run(StatThread.java:19)
Caused by: java.lang.ClassNotFoundException: Didn't find class "org.apache.http.message.BasicNameValuePair" on path: DexPathList[[zip file "/data/app/com.baidu.tts.sample-sB9EqOB35l-F8qD7bh13Wg==/base.apk", zip file "/data/app/com.baidu.tts.sample-sB9EqOB35l-F8qD7bh13Wg==/split_lib_dependencies_apk.apk", zip file "/data/app/com.baidu.tts.sample-sB9EqOB35l-F8qD7bh13Wg==/split_lib_resources_apk.apk", zip file "/data/app/com.baidu.tts.sample-sB9EqOB35l-F8qD7bh13Wg==/split_lib_slice_0_apk.apk", zip file "/data/app/com.baidu.tts.sample-sB9EqOB35l-F8qD7bh13Wg==/split_lib_slice_1_apk.apk", zip file "/data/app/com.baidu.tts.sample-sB9EqOB35l-F8qD7bh13Wg==/split_lib_slice_2_apk.apk", zip file "/data/app/com.baidu.tts.sample-sB9EqOB35l-F8qD7bh13Wg==/split_lib_slice_3_apk.apk", zip file "/data/app/com.baidu.tts.sample-sB9EqOB35l-F8qD7bh13Wg==/split_lib_slice_4_apk.apk", zip file "/data/app/com.baidu.tts.sample-sB9EqOB35l-F8qD7bh13Wg==/split_lib_slice_5_apk.apk", zip file "/data/app/com.baidu.tts.sample-sB9EqOB35l-F8qD7bh13Wg==/split_lib_slice_6_apk.apk", zip file "/data/app/com.baidu.tts.sample-sB9EqOB35l-F8qD7bh13Wg==/split_lib_slice_7_apk.apk", zip file "/data/app/com.baidu.tts.sample-sB9EqOB35l-F8qD7bh13Wg==/split_lib_slice_8_apk.apk", zip file "/data/app/com.baidu.tts.sample-sB9EqOB35l-F8qD7bh13Wg==/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.baidu.tts.sample-sB9EqOB35l-F8qD7bh13Wg==/lib/arm64, /data/app/com.baidu.tts.sample-sB9EqOB35l-F8qD7bh13Wg==/base.apk!/lib/arm64-v8a, /data/app/com.baidu.tts.sample-sB9EqOB35l-F8qD7bh13Wg==/split_lib_dependencies_apk.apk!/lib/arm64-v8a, /data/app/com.baidu.tts.sample-sB9EqOB35l-F8qD7bh13Wg==/split_lib_resources_apk.apk!/lib/arm64-v8a, /data/app/com.baidu.tts.sample-sB9EqOB35l-F8qD7bh13Wg==/split_lib_slice_0_apk.apk!/lib/arm64-v8a, /data/app/com.baidu.tts.sample-sB9EqOB35l-F8qD7bh13Wg==/split_lib_slice_1_apk.apk!/lib/arm64-v8a, /data/app/com.baidu.tts.sample-sB9EqOB35l-F8qD7bh13Wg==/split_lib_slice_2_apk.apk!/lib/arm64-v8a, /data/app/com.baidu.tts.sample-sB9EqOB35l-F8qD7bh13Wg==/split_lib_slice_3_apk.apk!/lib/arm64-v8a, /data/app/com.baidu.tts.sample-sB9EqOB35l-F8qD7bh13Wg==/split_lib_slice_4_apk.apk!/lib/arm64-v8a, /data/app/com.baidu.tts.sample-sB9EqOB35l-F8qD7bh13Wg==/split_lib_slice_5_apk.apk!/lib/arm64-v8a, /data/app/com.baidu.tts.sample-sB9EqOB35l-F8qD7bh13Wg==/split_lib_slice_6_apk.apk!/lib/arm64-v8a, /data/app/com.baidu.tts.sample-sB9EqOB35l-F8qD7bh13Wg==/split_lib_slice_7_apk.apk!/lib/arm64-v8a, /data/app/com.baidu.tts.sample-sB9EqOB35l-F8qD7bh13Wg==/split_lib_slice_8_apk.apk!/lib/arm64-v8a, /data/app/com.baidu.tts.sample-sB9EqOB35l-F8qD7bh13Wg==/split_lib_slice_9_apk.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:171)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.baidu.tts.e.a.c(StatHelper.java:192)
at com.baidu.tts.e.a.a(StatHelper.java:154)
at com.baidu.tts.e.a.b(StatHelper.java:130)
at com.baidu.tts.e.a.a(StatHelper.java:88)
at com.baidu.tts.e.b.run(StatThread.java:19)
Suppressed: java.io.IOException: No original dex files found for dex location /data/app/com.baidu.tts.sample-sB9EqOB35l-F8qD7bh13Wg==/split_lib_resources_apk.apk
at dalvik.system.DexFile.openDexFileNative(Native Method)
at dalvik.system.DexFile.openDexFile(DexFile.java:358)
at dalvik.system.DexFile.(DexFile.java:101)
at dalvik.system.DexFile.(DexFile.java:75)
at dalvik.system.DexPathList.loadDexFile(DexPathList.java:407)
at dalvik.system.DexPathList.makeDexElements(DexPathList.java:354)
at dalvik.system.DexPathList.(DexPathList.java:164)
at dalvik.system.BaseDexClassLoader.(BaseDexClassLoader.java:74)
02-18 16:51:49.985 26783-26879/com.baidu.tts.sample E/AndroidRuntime: at dalvik.system.BaseDexClassLoader.(BaseDexClassLoader.java:65)
at dalvik.system.PathClassLoader.(PathClassLoader.java:64)
at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:73)
at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:88)
at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:74)
at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:40)
at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:729)
at android.app.LoadedApk.getClassLoader(LoadedApk.java:812)
at android.app.LoadedApk.getResources(LoadedApk.java:1034)
at android.app.ContextImpl.createAppContext(ContextImpl.java:2357)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5817)
at android.app.ActivityThread.access$1200(ActivityThread.java:200)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1673)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:201)
at android.app.ActivityThread.main(ActivityThread.java:6806)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
请按demo集成。
和截图的看到的情况一样,是不是当前版本不能支持9.0的系统
我修改目标sdk版本为27后,运行在android 9上会弹出如下的提示框,demo也是如此。
我修改目标sdk版本为27后,运行在android 9上会弹出如下的提示框,demo也是如此。
demo修改了gradle版本和目标编译版本就不好使了。请看下这个是什么问题,当前sdk不支持高版本gradle和android sdk吗
若果demo可以运行,sdk文件下有傻瓜图文教程,按步骤来,不要急于集成。
不修改没有问题,我们开发的app需要在高版本的sdk和gradle下运行。
请不要修改DEMO,先试下DEMO能不能跑通。
Failed resolution of: Lorg/apache/http/message/BasicNameValuePair;
我发调用堆栈就提示内容有问题不让提交。
我使用demo也是异常,我使用的是小米mix2s ,安卓SDK版本9 MiUI 10.2,使用的是Baidu-TTS-Android-2.3.5.20180713_6101c2a Demo复现,修改了Demo的compileSdkVersion 为28,dependencies的gradle为3.1.3。其它demo代码没有动。
你好,图片里文字太小看不清,请用过文字的形式依次确认以下内容:
SDK 版本:已经切换到最新版本
是否已在Demo中复现:请务必在Demo中复现遇到的错误。无法在Demo复现的问题相对难以定位原因。
若能在Demo中复现,请描述:
SDK:(SDK类型,版本号)
初始化引擎代码:(在线引擎、离线引擎代码片段)
APPID:
问题描述:(具体问题,稳定复现/概率)
复现逻辑:(如何复现)
完整日志:(附上开启Debug模式的,从启动到结束的完整日志)