Android Studio: Add jar as library?

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

    On Mac OS X:

    1. Add jar as library (drag jar to libs, right click add as lib)

    2. Add compile statement to build.grade

    3. Install gradle v1.6 (use homebrew)

      • brew install gradle
      • gradle -v
      • if not v1.6, upgrade homebrew
    4. gradle clean (rebuild android did not work)

    This sorted me out.

提交回复
热议问题