AndroidStudio SSL peer shut down incorrectly
问题原因:网络链接超时
解决办法:在根build.gradle
中添加镜像仓库,一般我们选择阿里的 http://maven.aliyun.com/nexus/content/groups/public
1 |
|
org.gradle.process.internal.ExecException: Process ‘command ‘C:\Users\Vishnu Ruhela\AppData\Local\Android\sdk\build-tools\21.1.2\aapt.exe’’ finished with non- zero exit value 1
问题原因:未知,估计和资源文件问题有关系
解决办法:MACOS/Linux
环境下:终端输入./gradlew assembleDebug --info
Windows
环境下:终端输入gradlew assembleDebug --info
android-apt plugin is incompatible with the Android Gradle plugin. Please use ‘annotationProcessor’
问题原因:Android Studio版本从2.X升到3.0后出现
解决办法:点我
Unable to instantiate application
问题原因:在AndroidManifest.xml
里面自定义了application后触发。因此问题出现在没找到自定义的applicaiton
。
解决办法:确认自定义的application
的路径是否正确。一般为com.xxx.xxx.application
Configuration ‘compile’ is obsolete and has been replaced with ‘implementation’ and ‘api’.
问题原因:2017 年google
后,Android studio
版本更新至3.0
,更新中,连带着com.android.tools.build:gradle
工具也升级到了3.0.0
,在3.0.0
中使用了最新的Gralde 4.0
里程碑版本作为gradle
的编译版本,该版本gradle
编译速度有所加速。
解决办法:使用implementation
替换compile
ERROR: Failed to resolve: com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.47
问题原因:没有在build.gradle
中的allprojects下的repositories
引入需要的仓库。
解决办法:
1 |
|
android.view.InflateException: Binary XML file line #68: Binary XML file line #68: Error inflating class com.***
log详情:
1 |
|
问题原因:在使用自定义组合控件的时候,定义的XML文件dimes.xml
中的值漏写了sp
字体属性,导致抛出NotFoundException,具体可以看
getDimensionPixelSize`源码介绍
错误示范
1 |
|
正确写法
1 |
|
Unable to resolve dependency for ‘:app@debug/compileClasspath’
问题原因:网络问题。
解决办法:在project的build.gradle配置阿里云镜像即可。如:
1 |
|