我下載了新的Android Studio 1.4。Android Studio 1.4使用比API 23更低的API進行編譯(示例API 22)
我想編寫和編譯與API 22,而不是23 API代碼,即使我在搖籃改變targetSdkVersion
22和compileSdkVersion
22(當然其同步的)我得到這個錯誤:
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.
Error:Execution failed for task ':app:processDebugResources'.
com.android.ide.common.process.ProcessException:
org.gradle.process.internal.ExecException: Process 'command '/Users/sedkol /Code/adt-bundle-mac-x86_64-20140702/sdk/build-tools/23.0.1/aapt'' finished with non-zero exit value 1
此外,當我改變compileSdkVersion
和targetSdkVersion
至22
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:design:23.0.1'
都強調,當我在它懸停說:
此支持庫不應使用與compileSdkVersion (22)
不同的版本(23)。有一些庫或工具和庫的組合不兼容或可能導致錯誤。這樣一個不兼容的一個版本是不是最新版本的Android支持庫的編譯(或特別版本低於您targetSdkVersion
)
錯誤:(12,21)找不到與給定名稱相匹配的資源:attr'windowNoTitle'。 – user4938227
錯誤:(4,21)找不到與給定名稱相匹配的資源:attr'windowNoTitle'。 – user4938227
錯誤:執行任務':app:processDebugResources'失敗。 > com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:Process'command'/ Users/sedkol/Code/adt-bundle-mac-x86_64-20140702/sdk/build-tools /23.0.1/aapt''以非零退出值結束1 – user4938227