Add support library to Android Studio project

后端 未结 6 2074
天涯浪人
天涯浪人 2020-11-30 19:24

I just installed the new Android Studio and I\'m looking for a way to import the support library for Android.

Where is the option for that? In Eclipse that are just

6条回答
  •  一个人的身影
    2020-11-30 20:18

    Android no longer downloading the libraries from the SDK manager, it has to be accessed through Google's Maven repository.

    You will have to do something similar to this in your build.gradle file:

    allprojects {
        repositories {
            jcenter()
            maven {
                url "https://maven.google.com"
            }
        }
    }
    
    
    
    dependencies {
        ...
        compile "com.android.support:support-core-utils:27.0.2"
    }
    

    Find more details about the setting up process here and about the different support library revisions here.

提交回复
热议问题