有关Aapt2 Exception:AAPT Error: check logs for details 问题

作者:飞中缘

在网上查一般加入以下就可以解决

android.enableAapt2=false

但是这次已经添加但还是报这个错就有问题了,于是又各种翻腾整理如下:

 

首先根据check logs for details查看更多Error信息

在当前的Terminal窗口里输入“gradlew compileDebug --stacktrace -info”

或者“gradlew compileDebugSources --stacktrace -info”

查看都有哪些异常问题,再根据提示的异常问题进行解决

 

 

这是本人部分异常信息

经查看,是由以下问题导致:

1.Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib/1.1.3-2/kotlin-stdlib-1.1.3-2.pom'.

2.gradle 无法获取 pom文件

 

解决:

1.使用gradle 全局代理

在gradle.properties文件中添加
org.gradle.jvmargs=-DsocksProxyHost=127.0.0.1 -DsocksProxyPort=1086 

 

2.选中 启动Maven嵌入式存储库

 

完美解决!欢迎留言

感谢以下博主:

https://blog.csdn.net/u011618035/article/details/80574645

https://blog.csdn.net/zengmingen/article/details/79877676

https://www.jianshu.com/p/6a624f840721

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章