升级Android Studio2.4问题汇总


1. Warning:android-apt plugin is incompatible with future version of Android Gradle plugin. Please use 'annotationProcessor' configuration instead.

如上图所示是完整的警告提示
就是说新版本这个组件是不相容的需要去除

解决方案:

  • 在 build.gradle中删除这一行 ( apply plugin: 'android-apt' )
  • 删除目录app/build/generated 这个文件夹
  • 重新编译

2. Error:Could not initialize class com.android.ide.common.util.ReadWriteProcessLock

解决方法

停止这个进程,然后有两种方式来解决 :

1- File/ Invalidate Caches/Restart Android Studio,

2- 在Android Studio的Terminal 界面输入命令: ./gradlew --stop 然后重新编译项目


3.Warning:The Jack toolchain is deprecated. To enable support for Java 8 language features, remove 'jackOptions { ... }' from your build.gradle file, and add

问题原因:

AndroidStudio2.4默认工具链通过执行字节码转换,称为实现了新的语言特性desugar,在输出 javac编译器。Jack不再需要.

所以只要把jackOptions的配置去掉即可

另外AS现在默认支持lambda 因此不需要在配置retrolambda 即可适应简单
官网说明点击

你可能感兴趣的:(升级Android Studio2.4问题汇总)