Could not resolve com.android.support:appcompat-v7:26.1.0 in Android Studio new project

后端 未结 14 1914
一生所求
一生所求 2020-11-30 07:22

I know about this questions:

Failed to resolve: com.android.support:cardview-v7:26.0.0 android

Could not resolve com.android.support:appcompat-v7:26.1.0 [dup

14条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-30 08:13

    This issue seems to like the following.

    How to resolve repository certificate error in Gradle build

    Below steps may help:

    1. Add certificate to keystore-

    Import some certifications into Android Studio JDK cacerts from Android Studio’s cacerts.

    Android Studio’s cacerts may be located in

    {your-home-directory}/.AndroidStudio3.0/system/tasks/cacerts
    

    I used the following import command.

    $ keytool -importkeystore -v -srckeystore {src cacerts} -destkeystore {dest cacerts}
    

    2. Add modified cacert path to gradle.properties-

    systemProp.javax.net.ssl.trustStore={your-android-studio-directory}\\jre\\jre\\lib\\security\\cacerts
    systemProp.javax.net.ssl.trustStorePassword=changeit
    

    Ref : https://www.cresco.co.jp/blog/entry/2014//

提交回复
热议问题