Android Studio: Add jar as library?

后端 未结 30 2374
天命终不由人
天命终不由人 2020-11-21 05:54

I\'m trying to use the new Android Studio but I can\'t seem to get it working correctly.

I\'m using the Gson library to serialize/deserialize JSON-o

30条回答
  •  温柔的废话
    2020-11-21 06:44

    For newer Android 1.0.2 the following is already there in your build.gradle file

    implementation fileTree(include: ['*.jar'], dir: 'libs')
    

    Add the library jar to your libs folder -> right click the library -> click add as a library -> it asks you for the project to add it for -> select your project-> click ok The following line is automatically added to build.gradle

    implementation files('libs/android-query.jar')
    

    That did it for me. nothing more was required. i have shown this for android aquery another third party library for android.

提交回复
热议问题