百度Google各种无效,最后将Java 9.0.1 卸载删除,换上1.8.0_151 版本的jdk就可以了。
另外,AndroidStudio官方提醒: 升级到3.0后使用Java 1.8以上版本可能会出现已知的不稳定问题,最好使用不低于1.6版本的jdk。具体链接等我找到再放这里。
Mac 电脑需要注意,如果把AndroidStudio升级到了3.0.1以上了,一定要把jdk-9.0.1删除掉,如果还不行,找到Android Studio Contents目录下,找到info.plist文件,修改JVMVersion如下:<key>JVMVersion</key>
<string>1.7*,1.7+,1.8*,1.8+</string>,这样就可以了
其它:
如果想体验更快的编译速度:
- Faster incremental build speed due to per-class dexing. Each class is now compiled into separate DEX files, and only the classes that are modified are re-compiled. You should also expect improved build speeds for apps that set
minSdkVersion
to 20 or lower and use legacy multi-dex.(链接:https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html)