简体   繁体   中英

Tag mismatch error with ssl android studio - problem with wifi

Packages to install:

  • Android Emulator (emulator)

Preparing "Install Android Emulator (revision: 30.5.4)". Downloading https://dl.google.com/android/repository/emulator-windows_x64-7243153.zip An error occurred while preparing SDK package Android Emulator: Tag mismatch.: "Install Android Emulator (revision. 30.5.4)" failed: Failed packages:

  • Android Emulator (emulator)

I am getting such errors while downloading or updating anything in android studio.

but when I connect with my mobile data it works.

so maybe the problem is with my wifi.

also when I download anything in google chrome it says network failure again and again even if the internet speed is 30mbps.

My internet connection is very good but maybe it's a problem with the firewall or something.

Long time ago, I struggled with the same thing until I came up with a solution.

I assume your proxy performs SSL Inspection using custom root CA certificate and by doing so, Android Studio and/or JRE does troubles.

First, you need to export that custom certificate to a file: Simply browser to some site (let's say www.google.com ), then download the root certificate to a file. Found some instructions online: https://www.esri.com/arcgis-blog/products/bus-analyst/field-mobility/learn-how-to-download-a-ssl-certificate-for-a-secured-portal/

Second, get Android Studio to trust this certificate by adding it to accepted certificates list in Server Certificate preferences section.

Now configure your proxy in HTTP Proxy preferences section - I believe “Auto-detect proxy settings” is enough.

Finally, and that's the hard part, get your JRE to trust the certificate. Locate your JDK folder (File -> Project Structure), then install the certificate to the JRE's key store.

Windows CMD (password is changeit ): keytool.exe -importcert -alias MY_ALIAS -file PATH_TO_CERT_FILE -keystore PATH_TO_JDK_FOLDER\jre\lib\security\cacert

Mac terminal (password is also changeit ): sudo keytool -import -alias MY_ALIAS -file PATH_TO_CERT_FILE -keystore PATH_TO_JDK_FOLDER/Contents/Home/jre/lib/security/cacerts

Crossing my fingers that it'll work:) If not, I'll delete my answer so please keep me posted.

Whenever i used my wifi it showen me this error. Also my os use to show wifi connection is not secure. I've fixed this by using different wifi connection.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM