开发者

Idea IntelliJ Dependancies issue with Android Virtual Device

I may have bitten off more than i can chew here. I've moved outside of my .net / visual studio comfort zone for the first time in order to play with the Android SDK. I'm (attempting) to use IntelliJ.

I have a single module project. I want to "reference" the google gson library. After hours of tooling around i开发者_如何学Gon the project structure dialog, googling, reading the IntelliJ help and laughing at my own ineptness I managed to at least get a successful build.

However when i deploy to the virtual device, I note the "logcat" shows:

Could not find class 'com.google.gson.Gson', referenced from method com.example.HelloW$ClientThread.run

I'm assuming this is less to do with my code, and everything to do with how i ended up referencing the gson-1.7.1.jar file?

Can somebody tell me in the simplest terms how i add that dependancy successfully?


Adding jar file to Dependencies is easy and you can find the details in the official documentation.

Make sure that the library scope is set to Compile.

Here is the sample showing "lib" library that contains a couple of jars added to the module dependencies:

Idea IntelliJ Dependancies issue with Android Virtual Device

Idea IntelliJ Dependancies issue with Android Virtual Device

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜