Installation of certificate in Android Studio: הבדלים בין גרסאות בדף
שורה 12: | שורה 12: | ||
[[קובץ:Android-studio.jpg|android-studio]] | [[קובץ:Android-studio.jpg|android-studio]] | ||
+ | '''Note:''' This solution is probably not useful for the gradle subprocesses that the IDE runs. It turns out you will get gradle errors and need the next solution. | ||
If this does not work, try the next step: | If this does not work, try the next step: | ||
שורה 18: | שורה 19: | ||
<pre> | <pre> | ||
"C:\Program Files\Android\Android Studio\jre\jre\bin\keytool" -noprompt -trustcacerts -keystore "C:\Program Files\Android\Android Studio\jre\jre\lib\security\cacerts" -importcert -alias nf -file "C:\netfree-ca.crt" -storepass changeit | "C:\Program Files\Android\Android Studio\jre\jre\bin\keytool" -noprompt -trustcacerts -keystore "C:\Program Files\Android\Android Studio\jre\jre\lib\security\cacerts" -importcert -alias nf -file "C:\netfree-ca.crt" -storepass changeit | ||
− | </pre> | + | </pre>The command for Mac pc is: |
+ | sudo keytool -import -trustcacerts -alias netfree-ca -file Downloads/netfree-ca.crt -keystore /Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home/lib/security/cacerts -storepass changeit | ||
+ | When in instead of <code>Downloads/netfree-ca.crt</code>Write the path to the NetFreק certificate downloaded from [http://netfree.link/netfree-ca.crt here]. | ||
+ | |||
+ | '''Note:''' This solution will cause an error when trying to install updates to the IDE. This is caused by a change to one of the software's core files. To install software updates to the IDE, we recommend that you back up the cacerts file before running the action. Before installing an update, restore the cacerts file from the backup file. After installing the update you will need to run the above commands again. | ||
+ | |||
+ | Another option is to download the full new version and install it instead of upgrading from the software. | ||
+ | |||
+ | |||
+ | '''Alternate method''' | ||
+ | |||
+ | If you have on your computer another JDK installed with NetFree's certificate, you can configure Android Studio to use an alternate JDK instead of its embedded JDK. | ||
+ | |||
+ | To do this, press ctrl + shift + a, type the command: "switch boot JDK" and enter. | ||
+ | |||
+ | In the next window you select the replacement JDK. | ||
+ | |||
+ | '''Note:''' Doing so can cause unexpected problems and is at the user's sole responsibility. |
גרסה מ־22:13, 29 באוקטובר 2019
לעברית לחצו כאן
To switch from edit view to read view
Home page > Security certificate > Installation of certificate in Android Studio
Download the certificate of your Provider of NetFree from here. http://netfree.link/netfree-ca.crt
Open the Settings window in Android Studio: File > Settings > Tools > Server Certificates,
Click on the green plus and add the certificate from the downloaded file.
Note: This solution is probably not useful for the gradle subprocesses that the IDE runs. It turns out you will get gradle errors and need the next solution.
If this does not work, try the next step: Open the command prompt in Admin mode, and paste the following command (before doing so change the certificate location if it is not in drive C):
"C:\Program Files\Android\Android Studio\jre\jre\bin\keytool" -noprompt -trustcacerts -keystore "C:\Program Files\Android\Android Studio\jre\jre\lib\security\cacerts" -importcert -alias nf -file "C:\netfree-ca.crt" -storepass changeitThe command for Mac pc is:
sudo keytool -import -trustcacerts -alias netfree-ca -file Downloads/netfree-ca.crt -keystore /Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home/lib/security/cacerts -storepass changeit
When in instead of Downloads/netfree-ca.crt
Write the path to the NetFreק certificate downloaded from here.
Note: This solution will cause an error when trying to install updates to the IDE. This is caused by a change to one of the software's core files. To install software updates to the IDE, we recommend that you back up the cacerts file before running the action. Before installing an update, restore the cacerts file from the backup file. After installing the update you will need to run the above commands again.
Another option is to download the full new version and install it instead of upgrading from the software.
Alternate method
If you have on your computer another JDK installed with NetFree's certificate, you can configure Android Studio to use an alternate JDK instead of its embedded JDK.
To do this, press ctrl + shift + a, type the command: "switch boot JDK" and enter.
In the next window you select the replacement JDK.
Note: Doing so can cause unexpected problems and is at the user's sole responsibility.