4
votes

While building my project in Android Studio 2.1.1 I got this error:

Error:objc[2604]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.

I've seen other questions like this one but they all say it was fixed in some version of Java7.

2
I'm having the exact same issue. Mac OS X. have setted CompileOptions in gradle file to 1.7, but no changes: compileOptions { targetCompatibility JavaVersion.VERSION_1_7 sourceCompatibility JavaVersion.VERSION_1_7 }Jim Clermonts

2 Answers

3
votes

The following steps solved my issue:

Android Studio > File > Invalidate Caches / Restart.. > Invalidate and Restart

0
votes

The Android team has stated that this is a known issue with no negative effects. See AOSP issue 2049707 which references JDK issue 8022291