Android Studio cannot use secure connection for update complaining about using Java 6

In Android Studio Preferences Appearance & Behavior System Settings Updates I tried to enable the Use secure connection parameter:

enter image description here

But when I clicked the Apply button, the error "Secure connection is not supported on Java 6" :

enter image description here

I checked the JDK location setting in Project Structure , and /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home :

enter image description here

It seems like I'm using Java 7 and not Java 6. Then why does the secure connection option complain about unsupported Java 6?


If necessary, the installed JDKs on my machine are installed below: enter image description here

The first 1.6.0.jdk is for Apple , and the other 3 are for Oracle.

+5
source share
3 answers

This issue occurs on Mac OS. The JDK project (the JDK used to compile your code) is different from the JDK IDE (the JDK is used to run the IDE)

Your JDK project is 7, but your JDK IDE is 6.

In your case, you can add an environment variable for the IDE (through the terminal), as shown below:

 export STUDIO_JDK=/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk 

Check out these documents for more information:

http://tools.android.com/tech-docs/configuration/osx-jdk

http://tools.android.com/tech-docs/configuration

Happy coding!

+7
source

The exporting environment variable did not work for me. Editing the plist file.

 nano /Applications/Android\ Studio.app/Contents/Info.plist 

And find this line:

 <key>JVMVersion</key> <string>1.6*</string> 

Change the value from 1.6 * to 1.7 +

+1
source

This seems to be a bug that has already been documented by project participants ( link ). This error has long existed. The screenshot attached to the thread that discussed this issue definitely has an older version than Android Studio 2.0

At this point, I cannot find anything related to changing the JRE for Android Studio or Intellij. You can change the JDK, but this does not affect this error warning.

This thread will be updated, as more information will be available to solve this problem.

-1
source

Source: https://habr.com/ru/post/1246811/


All Articles