Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Some Conflicts were found in the installation area - Android Studio - cacerts error

I am on Android Studio 3.0.1 and wanted to upgrade it to latest one. But I am getting this attached error due to jre/jre/lib/security/cacerts.

Does any one have any idea how to fix it? It says patch cannot be applied.

enter image description here

like image 298
Raulp Avatar asked Jul 17 '18 05:07

Raulp


People also ask

Where is Cacert in JDK?

A certificates file named cacerts resides in the security properties directory, java. home \lib\security, where java. home is the runtime environment directory (the jre directory in the SDK or the top-level directory of the Java™ 2 Runtime Environment).

How do I open a cacerts file in readable format?

To view the entries in a cacerts file, you can use the keytool utility provided with Sun J2SDK versions 1.4 or later. The following example uses the -list command to display the CA certificates in the cacerts file.

Where are cacerts stored?

2. Certificate Store Error. We need to remember that the default location of this file is $JAVA_HOME/lib/security/cacerts.

Where is cacerts file in Windows?

On a Windows system, the location of the Java cacerts keystore is: install_dir \jre\lib\security\, and the location of the keytool is install_dir \jre\bin\.


2 Answers

I also modified my cacerts file to include a corpo firewall CA cert, but instead of having to reinstall Android Studio, I just

  1. Download the full .zip from Google's Archive that corresponded to my current version (in my case 3.1.3), then

  2. Extract the cacerts file and replaced my modified one.

  3. Run the update patch normally.

You will probably need to re-add your company CA to the newer version of cacerts. And if you are like me and don't deal with keytool very often, you probably don't remember the command so here you go (Password is changeit, but don't :)

keytool -import -alias key_alias -file "C:\Path\to\corpo_cert.der" -keystore "C:\Program Files\Android\Android Studio\jre\jre\lib\security\cacerts"

like image 94
Matthew Weber Avatar answered Sep 20 '22 09:09

Matthew Weber


I had the same issue. In my case I had added our proxy server certificate to cacerts manually. I deleted that cert (from C:\Program Files\Android\Android Studio\jre\jre\lib\security\cacerts) and that fixed the issue. Hope this helps.

like image 25
Laks Avatar answered Sep 21 '22 09:09

Laks