本文介绍了升级到android -P后无法构建项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
以下是我收到的错误
C:\Users\Dell\.gradle\caches \transforms-1\files-1.1\appcompat-v7-28.0.0-alpha1.aar\51cd62c84e9404bd66ab4daf252c48a1\res\values-v28\values-v28.xml
错误:(9, 5)错误:找不到资源android:attr / dialogCornerRadius。
C:\ Users \Dell\.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0-alpha1.aar\51cd62c84e9404bd66ab4daf252c48a1\res\ values \values.xml
错误:(252,5)错误:未找到资源android:attr / fontVariationSettings。
错误:(252,5)错误:未找到资源android:attr / ttcIndex。
E:\20thJune2017_7PM\trunk\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml
错误: (11)错误:找不到资源android:attr / dialogCornerRadius。
错误:(7)未找到资源android:attr / dialogCornerRadius。
错误:(11)未找到资源android:attr / dialogCornerRadius。
E:\20thJune2017_7PM\trunk\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml
错误:(486)资源未找到android:attr / fontVariationSettings。
错误:(486)找不到资源android:attr / ttcIndex。
错误:链接引用失败。
错误:java.util.concurrent.ExecutionException:java.util.concurrent.ExecutionException:com.android.tools.aapt2.Aapt2Exception:AAPT2错误:检查日志以获取详细信息
错误:java.util.concurrent .ExecutionException:com.android.tools.aapt2.Aapt2Exception:AAPT2错误:检查日志以获取详细信息
错误:com.android.tools.aapt2.Aapt2Exception:AAPT2错误:检查日志以获取详细信息
错误:执行失败的任务':app:processDebugResources'。
>无法执行aapt
以下是我的build.gradle(应用程序级别)
依赖项{
编译fileTree(包括:''.jar'],dir:'libs')
androidTestCompile('com .android.support.test.espresso:espresso-core:2.2.2',{
exclude group:'com.android.support',module:'support-annotations'
})
compile'com.android.support:appcompat-v7:+'
compile'com.android.support.constraint:constraint-layout:1.0.0-alpha3'
compile'com.android.support :design:+'
compile'com.android.support:support-v4:+'
testCompile'junit:junit:4.12'
compile'com.squareup.retrofit2:retrofit:2.1 .0'
compile'com.squareup.retrofit2:converter-gson:2.1.0'
compile'com.google.code.gson:gson:2.7'
compile'de.hdodenhof :circleimageview:2.1.0'
compile'com.squareup.picasso:picasso:2.5.2'
co mpile'com.github.fiskurgit:ChipCloud:2.1.1'
compile'com.google.android.gms:play-services-maps:11.4.0'
compile'com.squareup.okhttp3: logging-interceptor:3.3.0'
compile'commons-codec:commons-codec:1.10'
compile'com.crittercism:crittercism-android-agent:+'
compile'ch。 hsr:geohash:1.3.0'
编译'com.google.firebase:firebase-messaging:11.4.0'
编译'com.google.firebase:firebase-core:11.4.0'
compile'com.google.android.gms:play-services-analytics:11.4.0'
compile'com.ahmedjazzar.rosetta:rosetta:1.0.1'
}
我已经尝试了不同的解决方案,但是没有任何工作。您可以帮我解决这个问题。提前感谢。
解决方案
阅读@你的编译SDK版本和(我的API:26:Android 8.0)并在您的Build.gradle Module:app中更改下一件事:
- >>> form:
implementation'com.android.support:design:28.0.0-beta1'
implementation'com.android.support:cardview-v7:28.0.0-beta1'
implementation'com.android.support:recyclerview-v7:28.0.0-beta1'
implementation'com .android.support:appcompat-v7:28.0.0-beta1'
- >>> to:
implementation'com.android.support:design:26.0.0-beta1'
implementation'com.android。支持:cardview-v7:26.0.0-beta1'
implementation'com.android.support:recyclerview-v7:26.0.0-beta1'
implementation'com.android.support:appcompat-v7: 26.0.0-beta1'
祝您有美好的一天...
Below are the errors which I am getting
C:\Users\Dell\.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0-alpha1.aar\51cd62c84e9404bd66ab4daf252c48a1\res\values-v28\values-v28.xml
Error:(9, 5) error: resource android:attr/dialogCornerRadius not found.
C:\Users\Dell\.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0-alpha1.aar\51cd62c84e9404bd66ab4daf252c48a1\res\values\values.xml
Error:(252, 5) error: resource android:attr/fontVariationSettings not found.
Error:(252, 5) error: resource android:attr/ttcIndex not found.
E:\20thJune2017_7PM\trunk\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml
Error:(11) error: resource android:attr/dialogCornerRadius not found.
Error:(7) resource android:attr/dialogCornerRadius not found.
Error:(11) resource android:attr/dialogCornerRadius not found.
E:\20thJune2017_7PM\trunk\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml
Error:(486) resource android:attr/fontVariationSettings not found.
Error:(486) resource android:attr/ttcIndex not found.
Error:failed linking references.
Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:Execution failed for task ':app:processDebugResources'.
> Failed to execute aapt
Below is my build.gradle(app level)
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:+'
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha3'
compile 'com.android.support:design:+'
compile 'com.android.support:support-v4:+'
testCompile 'junit:junit:4.12'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.google.code.gson:gson:2.7'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.github.fiskurgit:ChipCloud:2.1.1'
compile 'com.google.android.gms:play-services-maps:11.4.0'
compile 'com.squareup.okhttp3:logging-interceptor:3.3.0'
compile 'commons-codec:commons-codec:1.10'
compile 'com.crittercism:crittercism-android-agent:+'
compile 'ch.hsr:geohash:1.3.0'
compile 'com.google.firebase:firebase-messaging:11.4.0'
compile 'com.google.firebase:firebase-core:11.4.0'
compile 'com.google.android.gms:play-services-analytics:11.4.0'
compile 'com.ahmedjazzar.rosetta:rosetta:1.0.1'
}
I have tried different solutions from stackoverflow but none worked.Can you please help me on this.Thanks in advance.
解决方案
look @ your Compile SDK Version and (mine whas API: 26: Android 8.0)
and change in your Build.gradle Module:app the next thing:
->>>form: implementation 'com.android.support:design:28.0.0-beta1'
implementation 'com.android.support:cardview-v7:28.0.0-beta1'
implementation 'com.android.support:recyclerview-v7:28.0.0-beta1'
implementation 'com.android.support:appcompat-v7:28.0.0-beta1'
->>>to: implementation 'com.android.support:design:26.0.0-beta1'
implementation 'com.android.support:cardview-v7:26.0.0-beta1'
implementation 'com.android.support:recyclerview-v7:26.0.0-beta1'
implementation 'com.android.support:appcompat-v7:26.0.0-beta1'
have a nice day...
这篇关于升级到android -P后无法构建项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!