Android Studio: Add jar as library?

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

    I have read all the answers here and they all seem to cover old versions of Android Studio!

    With a project created with Android Studio 2.2.3 I just needed to create a libs directory under app and place my jar there. I did that with my file manager, no need to click or edit anything in Android Studio.

    Why it works? Open Build / Edit Libraries and Dependencies and you will see:

    {include=[*.jar], dir=libs}
    

提交回复
热议问题