mac android studio 编译时报Class JavaLaunchHelper is implemented in both

时间:2020-12-03 17:21:05
Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined

  

windows上没有这个问题,有人说jdk的问题,试了一下jdk7和jdk8都有这个问题,后来查到原因是和gradle最新的插件不兼容,改成1.5.0之后解决!

classpath 'com.android.tools.build:gradle:1.5.0'

  将2.1换成1.5就好了。

android studio真坑爹!