How to add a jar in External Libraries in android studio

前端 未结 14 2346
北海茫月
北海茫月 2020-11-22 16:17

I am new to Android Studio. What I need to do is add a few jar files in the External Libraries below the < JDK > folder.

14条回答
  •  梦谈多话
    2020-11-22 16:49

    Example with Parse jar...

    Add jars to libs folder from Project view … create lib folder if not exists

    Copy all jars there...

    Add libs to gradle.... in build.gradle file :

    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        compile 'com.android.support:appcompat-v7:23.0.0'
        compile 'com.android.support:design:23.0.0'
        compile 'com.android.support:percent:23.0.0'
        compile 'com.parse.bolts:bolts-android:1.+'
        compile fileTree(dir: 'libs', include: 'Parse-*.jar’)
    }
    

    For add all jars of lib folder... change Parse-*.jar to *.jar

提交回复
热议问题