2017-06-15 54 views
0

我一直在爲在Android手機上啓動我的離子應用而苦苦掙扎。當我執行ionic build android,我得到這個錯誤:AAPT:錯誤檢索項目的父項

:processDebugResources C:\mobileProject\platforms\android\build\intermediates\res\merged\debug\values-v24\values-v24.xml:3 : AAPT: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'. 
FAILED 

C:\mobileProject\platforms\android\build\intermediates\res\merged\debug\values-v24\values-v24.xml:4 : AAPT: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'. 


FAILURE: Build failed with an exception. 

* What went wrong: 
Execution failed for task ':processDebugResources'. 
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\lma3466\AppData\Local\Android\android-sdk\build-tools\25.0.1\aapt.exe'' finished with non-zero exit value 1 


BUILD FAILED 

Total time: 1 mins 17.731 secs 
* Try: 
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. 
ERROR building one of the platforms: Error code 1 for command: cmd with args: /s,/c,"C:\mobileProject\platforms\android\gradlew cdvBuildDebug -b C:\pmobileProject\platforms\android\build.gradle -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true" 
You may not have the required environment or OS to build this project 
Error: Error code 1 for command: cmd with args: /s,/c,"C:\mobileProject\platforms\android\gradlew cdvBuildDebug -b C:\mobileProject\platforms\android\build.gradle -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true" 

這是我已經安裝了MITH我的SDK經理:SDK manager 我該如何解決這個問題?

謝謝!

+0

我不知道它是如何工作的離子但在Android的發展就意味着目標SDK是低於24這樣顯然不存在重大主題 – Selvin

+0

我已經安裝了版本26和23 ...當我刪除版本23時,我有一個錯誤要求我安裝它... – Anna

回答

0

您需要安裝與您正在使用的Android API相同的revisionAndroid SDK Build-tools

顯然最新的API是Android 8.0.0 (API 26),但是您沒有安裝Android SDK Build-tools revision 26

也在您的終端中嘗試ionic platform remove android && ionic platform add android

順便說一下,您可能不需要安裝所有這些系統映像。它們的體積很大,你只需要安裝你需要的模擬器,通常只有Intel x86 Atom System Image

+0

即使安裝了'Android SDK Build-tools revision 26',我也有同樣的錯誤:( – Anna

+0

是的,剛纔注意到你的gradle是在利用修訂版本25的構建工具,看看這是否有幫助https://stackoverflow.com/questions/30899963/how-to-fix-22-0-1-aapt-exe-完成與 - 非零出口值-1#30900651 – maninak

0

更新科爾多瓦6.5.0解決我的問題......

相關問題