5

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.

1
  • 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 } May 29, 2016 at 19:44

2 Answers 2

3

The following steps solved my issue:

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

1
  • This solved my issue only temporary. After few builds I get the errors again. Thanks for the answer though.
    – Micer
    Feb 15, 2017 at 12:18
1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.