繁体   English   中英

使用Android Studio 3.2,我无法为API 26以下构建应用

[英]using Android studio 3.2, i cannot build app for below API 26

我在Android Studio 3.2(Mac)上创建了一个简单的Quiz应用程序,编译.apk后,它在Android 6(棉花糖)及以下版本中给出致命错误,而在Nougat及以上版本上可完美运行。 将targetSDk设置为26以下会使我的代码出错,而保持在26以上则效果很好。

在棉花糖上运行时Logcat显示错误。

06-06 17:16:56.452 10525-10525/? I/art: Not late-enabling -Xcheck:jni (already on)
06-06 17:16:56.642 10525-10525/com.csstudio.knowledgeablequizz W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=x86 --instruction-set-features=smp,ssse3,-sse4.1,-sse4.2,-avx,-avx2 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=x86 --instruction-set-features=default --dex-file=/data/app/com.csstudio.knowledgeablequizz-1/split_lib_dependencies_apk.apk --oat-file=/data/dalvik-cache/x86/data@app@com.csstudio.knowledgeablequizz-1@split_lib_dependencies_apk.apk@classes.dex) because non-0 exit status
06-06 17:16:56.855 10525-10525/com.csstudio.knowledgeablequizz W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=x86 --instruction-set-features=smp,ssse3,-sse4.1,-sse4.2,-avx,-avx2 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=x86 --instruction-set-features=default --dex-file=/data/app/com.csstudio.knowledgeablequizz-1/split_lib_slice_0_apk.apk --oat-file=/data/dalvik-cache/x86/data@app@com.csstudio.knowledgeablequizz-1@split_lib_slice_0_apk.apk@classes.dex) because non-0 exit status
06-06 17:16:56.900 10525-10525/com.csstudio.knowledgeablequizz W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=x86 --instruction-set-features=smp,ssse3,-sse4.1,-sse4.2,-avx,-avx2 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=x86 --instruction-set-features=default --dex-file=/data/app/com.csstudio.knowledgeablequizz-1/split_lib_slice_1_apk.apk --oat-file=/data/dalvik-cache/x86/data@app@com.csstudio.knowledgeablequizz-1@split_lib_slice_1_apk.apk@classes.dex) because non-0 exit status
06-06 17:16:56.952 10525-10525/com.csstudio.knowledgeablequizz W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=x86 --instruction-set-features=smp,ssse3,-sse4.1,-sse4.2,-avx,-avx2 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=x86 --instruction-set-features=default --dex-file=/data/app/com.csstudio.knowledgeablequizz-1/split_lib_slice_2_apk.apk --oat-file=/data/dalvik-cache/x86/data@app@com.csstudio.knowledgeablequizz-1@split_lib_slice_2_apk.apk@classes.dex) because non-0 exit status
06-06 17:16:57.032 10525-10525/com.csstudio.knowledgeablequizz W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=x86 --instruction-set-features=smp,ssse3,-sse4.1,-sse4.2,-avx,-avx2 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=x86 --instruction-set-features=default --dex-file=/data/app/com.csstudio.knowledgeablequizz-1/split_lib_slice_3_apk.apk --oat-file=/data/dalvik-cache/x86/data@app@com.csstudio.knowledgeablequizz-1@split_lib_slice_3_apk.apk@classes.dex) because non-0 exit status
06-06 17:16:57.144 10525-10525/com.csstudio.knowledgeablequizz W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=x86 --instruction-set-features=smp,ssse3,-sse4.1,-sse4.2,-avx,-avx2 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=x86 --instruction-set-features=default --dex-file=/data/app/com.csstudio.knowledgeablequizz-1/split_lib_slice_4_apk.apk --oat-file=/data/dalvik-cache/x86/data@app@com.csstudio.knowledgeablequizz-1@split_lib_slice_4_apk.apk@classes.dex) because non-0 exit status
06-06 17:16:57.187 10525-10525/com.csstudio.knowledgeablequizz W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=x86 --instruction-set-features=smp,ssse3,-sse4.1,-sse4.2,-avx,-avx2 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=x86 --instruction-set-features=default --dex-file=/data/app/com.csstudio.knowledgeablequizz-1/split_lib_slice_5_apk.apk --oat-file=/data/dalvik-cache/x86/data@app@com.csstudio.knowledgeablequizz-1@split_lib_slice_5_apk.apk@classes.dex) because non-0 exit status
06-06 17:16:57.248 10525-10525/com.csstudio.knowledgeablequizz W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=x86 --instruction-set-features=smp,ssse3,-sse4.1,-sse4.2,-avx,-avx2 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=x86 --instruction-set-features=default --dex-file=/data/app/com.csstudio.knowledgeablequizz-1/split_lib_slice_6_apk.apk --oat-file=/data/dalvik-cache/x86/data@app@com.csstudio.knowledgeablequizz-1@split_lib_slice_6_apk.apk@classes.dex) because non-0 exit status
06-06 17:16:57.297 10525-10525/com.csstudio.knowledgeablequizz W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=x86 --instruction-set-features=smp,ssse3,-sse4.1,-sse4.2,-avx,-avx2 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=x86

我过去2天一直在寻找该错误的解决方案,最后发现我的Drawables图像位于文件夹V24下,这是因为它支持API 24以上的应用程序。 。 感谢所有花时间帮助我的人。 :)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM