Android Studio: Add jar as library?

后端 未结 30 2447
天命终不由人
天命终不由人 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:57

    1. Added the libs folder at the level of app.
    2. Added all the jars in this project.
    3. Next, selected all the jars, in the libs folder,
    4. right click on the selected items, and say add library
    5. then you will find the jars expansion option, within the project explorer itself.

    I observed CTRL + ALT + SHIFT + S --> project structure --> app-module -->Dependencies" already had an entry as (dir: 'libs', include: '*.jar') under compile-option, initially. And after adding the jar's as per the steps stated above, the build.gradle got the entries for the new added jar's, itself.

提交回复
热议问题