Add support library to Android Studio project

后端 未结 6 2083
天涯浪人
天涯浪人 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:20

    In Android Studio 1.0, this worked for me :-
    Open the build.gradle (Module : app) file and paste this (at the end) :-

    dependencies {
        compile "com.android.support:appcompat-v7:21.0.+"
    }
    

    Note that this dependencies is different from the dependencies inside buildscript in build.gradle (Project)
    When you edit the gradle file, a message shows that you must sync the file. Press "Sync now"

    Source : https://developer.android.com/tools/support-library/setup.html#add-library

提交回复
热议问题