Android Studio: Add jar as library?

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

    Ive done above 3 steps and its work charm for me.

    (I am using Android Studio 2.1.2)

    Step 1

    • Add your jar package name (as an example compile 'com.squareup.okhttp3:okhttp:3.3.1') into gradle build script under build.gradle(Module:app).

    Step 2: Right click on app folder -> New -> Module

    Step 3: Click Import JAR/.AAR Package Then browse your package. as an example: OkHttp.jar

提交回复
热议问题