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

后端 未结 14 1864
一生所求
一生所求 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条回答
  • well got this answer from another site and don't want to take any credit for this but this solution works like butter.

    Go to File\Settings\Gradle. Deselect the "Offline work" box. Now you can connect and download any necessary or missing dependencies.

    0 讨论(0)
  • 2020-11-30 07:52

    OK It's A Wrong Approach But If You Use it Like This :

    compile "com.android.support:appcompat-v7:+"
    

    Android Studio Will Use The Last Version It Has.

    In My Case Was 26.0.0alpha-1.

    You Can See The Used Version In External Libraries (In The Project View).

    I Tried Everything But Couldn't Use Anything Above 26.0.0alpha-1, It Seems My IP Is Blocked By Google. Any Idea? Comment

    0 讨论(0)
  • 2020-11-30 07:53

    this work for me

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

    change 26.0.0 to 26.0.1

    compile 'com.android.support:appcompat-v7:26.0.1'
    
    0 讨论(0)
  • 2020-11-30 07:55

    In my case, this error occur when i tried to use gridView

    I resolved it by removing this line from build.grade(Module) file

    implementation 'com.android.support:gridlayout-v7:28.0.0-alpha3'
    
    0 讨论(0)
  • 2020-11-30 08:02

    Try to clear cache in android studio by File-> Invalidate cache -> invalidate after invalidating build-> clean project Then you can able to build the project

    0 讨论(0)
  • 2020-11-30 08:07

    Your android studio may be forgot to put : buildToolsVersion "26.0.0" you need 'buildTools' to develop related design and java file. And if there is no any buildTools are installed in Android->sdk->build-tools directory then download first.

    0 讨论(0)
提交回复
热议问题