Failed to resolve: com.android.support:appcompat-v7 24.0.1

前端 未结 9 1213
清酒与你
清酒与你 2020-12-10 10:29

I have searched around a lot but I cannot really find a post that helps I am somewhat new to android so some of this goes over my head. Anyway, my problems started when I go

相关标签:
9条回答
  • 2020-12-10 11:10

    Change a character - to :

    compile 'com.android.support:appcompat-v7:24.2.1'
    

    rather than

    compile 'com.android.support:appcompat-v7-24.2.1'
    
    0 讨论(0)
  • 2020-12-10 11:11

    try

      compile 'com.android.support:appcompat-v7:24.2.1'
    

    EDIT

    For sdk 27

    buildToolsVersion "27.0.3"
    
    implementation "com.android.support:appcompat-v7:27.1.1"
    
    0 讨论(0)
  • 2020-12-10 11:11

    Try adding jcenter like this way

    repositories {
        jcenter {
            url "http://jcenter.bintray.com/"
        }
    }
    

    Rather than

      repositories {
            jcenter()
        }
    
    0 讨论(0)
  • 2020-12-10 11:11

    Make sure that this folder exists:

    \your-android-sdk\extras\android\m2repository\com\android\support\appcompat-v7\24.0.1
    

    Of course, 24.0.1 should be replaced by the latest version.

    I had this problem because I occasionally renamed 24.0.1 to something else and so the required folder couldn't be found.

    0 讨论(0)
  • 2020-12-10 11:16

    In build.gradle in all projects, add Marvel and add this URL 'https://maven.google.com'

    0 讨论(0)
  • 2020-12-10 11:19

    You can also write like this:

    allprojects {
            repositories {
                jcenter()
                maven {
                    url "https://maven.google.com"
                }
            }
        }
    
    0 讨论(0)
提交回复
热议问题