Paul Stanley
Paul Stanley

Reputation: 2161

Android Studio Import Dependencies

I had to re-install Android Studio 2.1.3 and now i have some errors. Some of my imports are missing e.g.

 android.os.Handler;
 google.gson.Gson;
 android.util.Log;

How do install these libraries? I tried File=>project Structure=>app=>depenencies and did a search for google.gson.Gson was there but studio is not loading it. The other libraries were not listed in dependencies. Where can I load those.

Upvotes: 1

Views: 617

Answers (2)

Paul Stanley
Paul Stanley

Reputation: 2161

Make sure your using Android Studio as admin otherwise upating gradle will fail. This answer helped me.

  http://stackoverflow.com/questions/18555135/the-best-way-to-integrate-third-              party-   library-in-android-studio

Upvotes: 0

vikash kumar tiwari
vikash kumar tiwari

Reputation: 29

You don't need to add android.os.Handler and android.util.Log in your dependencies.if you have allready add Gson api as

compile 'com.google.code.gson:gson:2.2.4'

just build your project the classes will be automatically import,if not then go to your source code and line which are shown in red hit alt+enter and import classes.

Upvotes: 1

Related Questions