Installation of certificate in Android Studio: הבדלים בין גרסאות בדף

מתוך ויקי נטפרי
קפיצה לניווט קפיצה לחיפוש
(יצירת דף עם התוכן "<div lang="en" dir="ltr" class="mw-content-ltr"> <div lang="he" dir="rtl"> לעברית לחצו כאן </div> <div...")
 
מ (fix: use {{he}} for link to hebrew page instead of {{en}} (דרך WP:JWB))
 
(8 גרסאות ביניים של 5 משתמשים אינן מוצגות)
שורה 1: שורה 1:
<div lang="en" dir="ltr" class="mw-content-ltr">
+
{{he|התקנת תעודה ב-Android Studio}}
<div lang="he" dir="rtl">
+
{{Navigation|Security certificate}}
לעברית [[התקנת תעודה ב Android Studio|לחצו כאן]]
 
</div>
 
  
<div lang="en" dir="ltr">
+
Download the certificate for your Internet provider from here: https://netfree.link/netfree-ca.crt.
<small>
 
''[[NetFriends|Home page]]'' > ''[[Security certifiate]]'' > ''Installation of certificate in Android Studio''
 
</small>
 
 
 
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'',
 
Open the Settings window in Android Studio:  ''File'' > ''Settings'' > '' Tools'' > ''Server Certificates'',
שורה 17: שורה 10:
 
[[קובץ: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 dos 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):
 
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):
  
 
<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 macOS 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
 +
Replace <code>Downloads/netfree-ca.crt</code> with the path to the NetFree certificate which may be 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.

גרסה אחרונה מ־04:10, 17 באוגוסט 2023

לעברית לחצו כאן

To switch from edit view to read view

To search in the Wiki

Home page > Security certificate > Installation of certificate in Android Studio ‎‎


Download the certificate for your Internet provider from here: https://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.

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:

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 changeit
The command for macOS 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

Replace Downloads/netfree-ca.crt with the path to the NetFree certificate which may be 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.