Failed to execute aapt的奇怪解決方法
這幾天換了新電腦,原來的檔案是在老版andorid studio2.2上寫的,於是將檔案移植到andorid studio3.1.2上,但是執行專案出現Failed to execute aapt這個問題,錯誤程式碼如下圖所示:
按照網上的方法在SDKtool裡下載SDKbuild tools,但是始終報錯。如下圖可見已經將build tools安裝完畢:
build.gradle檔案如下圖所示:
無論是compileSdkVersion還是buildToolsVersion均已匹配,但是執行依然報錯。由於之前遇到過AATP2 error所以按照網上的方法在gradle.properties里加入一句android.enableAapt2=false。我想是否與這句禁用有關?於是將false改為true,專案成功編譯,奇怪的是之前遇到的AATP2錯誤也並未發生。其原理還需研究,希望給遇到該問題的人一點幫助。
相關文章
- app:processReleaseResources, Failed to execute aaptAPPAIAPT
- NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load xxxx錯誤解決方法ErrorAIXMLHTTP
- Conversion to Dalvik format failed: Unable to execute dexORMAI
- 解決Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile(default-compile)AIGoApacheMavenPluginCompile
- smplx 的 libGL error: MESA-LOADER: failed to open swrast 的解決方法ErrorAIAST
- 解決:Failed to load ApplicationContextAIAPPContext
- FreeBSD系統下zfs: failed with error 6錯誤的解決方法AIError
- 解決Spring Boot測試方法Failed to load ApplicationContext問題Spring BootAIAPPContext
- Apache httpclient的execute方法除錯ApacheHTTPclient除錯
- git push出現unpack failed: error Missing tree錯誤的解決方法GitAIError
- 奇怪報錯資訊“db already exists with different case already have”解決方法
- 關於Failed to resolve的問題解決AI
- 解決:Failed to download metadata for repo ‘base‘AI
- Android Studio 解決編譯報錯 Could not download aapt2-windows.jarAndroid編譯APTWindowsJAR
- Failed to execute user defined function(anonfun$concatStr$1: (map<string,string>, string) => string)AIFunction
- win10系統開機提示critical service failed錯誤的解決方法Win10AI
- win10玩絕地求生提示failed to install battleye service解決方法Win10AIBAT
- Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compileAIGoApacheMavenPluginCompile
- 關於python安裝dlib報錯“ ImportError: DLL load failed”的解決方法之一PythonImportErrorAI
- IDEA提示failed to load JVM DLL的解決辦法IdeaAIJVM
- Oracle Net Configuration Assistant failed異常的解決方案OracleAI
- imagick使用readImage報錯 Failed to read the file 或者沒有報錯內容的解決方法AI
- 解決 yum clean all Error rpmdb open failedErrorAI
- vscode中Git: host key verification failed的解決辦法VSCodeGitAI
- 奇怪的漢諾塔 - 題解
- Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:exec (default-cli)AIGoMavenPlugin
- ] Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin Cannot instantiate object of typeAIGoMyBatisMavenPluginObject
- Failed to load AppCompat ActionBar with unknown error.--AS遇到檢視控制元件不顯示的解決方法AIAPPError控制元件
- 啟動 idea 彈出“Failed to load JVM DLL\bin\server\jvm.dll”錯誤的解決方法IdeaAIJVMServer
- flutter packages get - pub get failed (1)解決方案FlutterPackageAI
- 解決elasticsearch:Exception BindTransportException[Failed to bind to [9300-9400]]ElasticsearchExceptionAI
- 解決 Android studio Connect to 127.0.0.1:[/127.0.0.1] failed: Connection refusedAndroid127.0.0.1AI
- INSTALL_FAILED_NO_MATCHING_ABIS終極解決方案AI
- TabError的解決方法Error
- IDEA啟動時報Failed to create JVM錯誤的解決IdeaAIJVM
- 解決 sail composer update 時出現的 Update of laravel/sail failedAILaravel
- 解決nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)NginxAI
- idea系列:解決啟動 failed to load JVM DLL 提示IdeaAIJVM