Android Studio升级到3.0,抛出Aapt2Exception异常
Posted 苏小七
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Android Studio升级到3.0,抛出Aapt2Exception异常相关的知识,希望对你有一定的参考价值。
android studiao错误:
Android resource linking failed
Output: D:\_ASWorkSpacephone_newappsrcmain
esdrawablemm_title_back_btn.xml:4: error: resource drawable/mm_title_back_focused (aka com.smartdoorbell.activity:drawable/mm_title_back_focused) not found.
D:\_ASWorkSpacephone_newappsrcmain
esdrawablemm_title_back_btn.xml:5: error: resource drawable/mm_title_back_pressed (aka com.smartdoorbell.activity:drawable/mm_title_back_pressed) not found.
D:\_ASWorkSpacephone_newappsrcmain
esdrawablemm_title_back_btn.xml:6: error: resource drawable/mm_title_back_pressed (aka com.smartdoorbell.activity:drawable/mm_title_back_pressed) not found.
D:\_ASWorkSpacephone_newappsrcmain
esdrawablemm_title_back_btn.xml:7: error: resource drawable/mm_title_back_normal (aka com.smartdoorbell.activity:drawable/mm_title_back_normal) not found.
error: failed linking file resources.
Command: C:Userselaine.gradlecaches ransforms-1files-1.1aapt2-3.2.0-4818971-windows.jar 1420f994b14e5123620886adc2b29c9aapt2-3.2.0-4818971-windowsaapt2.exe link -I
D:adt-bundle-windows-x86_64_with_Android_5.0sdkplatformsandroid-26android.jar
--manifest
D:\_ASWorkSpacephone_newappuildintermediatesmerged_manifestsphoneRollupReleaseprocessPhoneRollupReleaseManifestmergedAndroidManifest.xml
-o
D:\_ASWorkSpacephone_newappuildintermediatesprocessed_resphoneRollupReleaseprocessPhoneRollupReleaseResourcesout
esources-phoneRollupRelease.ap_
-R
@D:\_ASWorkSpacephone_newappuildintermediatesincrementalprocessPhoneRollupReleaseResources
esources-list-for-resources-phoneRollupRelease.ap_.txt
--auto-add-overlay
--java
D:\_ASWorkSpacephone_newappuildgenerated
ot_namespaced_r_class_sourcesphoneRollupReleaseprocessPhoneRollupReleaseResources
--proguard-main-dex
D:\_ASWorkSpacephone_newappuildintermediateslegacy_multidex_aapt_derived_proguard_rulesphoneRollupReleaseprocessPhoneRollupReleaseResourcesmanifest_keep.txt
--custom-package
com.smartdoorbell.activity
-0
apk
--output-text-symbols
D:\_ASWorkSpacephone_newappuildintermediatessymbolsphoneRollup
eleaseR.txt
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.0-4818971-windows Daemon #0
gradle.properties
中添加下面内容
#Tue Oct 17 10:08:09 CST 2017
android.enableAapt2=false
以上是关于Android Studio升级到3.0,抛出Aapt2Exception异常的主要内容,如果未能解决你的问题,请参考以下文章
升级到 Android Studio 3.0 + Gradle 4.1 遇到的一些坑及解决方案
Gradle plugin 3.0 & Android Studio 3.0
ANDROID STUDIO 3.0 升级:错误:无法解析配置“:app:xxxxxxxDebugCompileClasspath”的所有文件