-1

I am using a .jar as a dependency for my project, but Android Studio keeps saying "cannot resolve symbol" when I attempt to use a class from the .jar. The weird thing is, it does recognize the classes and methods from the dependent .jar file but it wont let me use them. For example, it tries to auto complete the method but then it says it cant resolve the symbol.

I made sure that I included compile ".jar_name" under dependencies in the build.gradle. I have also tried rebuilding the project but it did not work.

Vincent Williams
  • 2,836
  • 3
  • 17
  • 22
  • Try sync your project with your build.gradle – Alexander Kulyakhtin Jan 27 '15 at 20:58
  • Hi, please improve your question by adding a screenshot or a code snippet (e.g. how you add the library to project), or pretty much anything you can to help us identify the problem. – Eugen Pechanec Jan 27 '15 at 20:58
  • Sorry i tried to upload screenshots but i dont have high enough rep. I am using Android Studio and i have tried syncing my build.gradle. Also under dependecies in the build.gradle i have compile files('library name') – Vincent Williams Jan 28 '15 at 14:06
  • Also i have the .jar file in the correct place in the libs folder. And i tried doing invalidate caches/restart like was suggested in other threads but that did not work – Vincent Williams Jan 28 '15 at 14:07

1 Answers1

0

It must have been an issue with that particular .jar file. I was never able to get it to work, but I was able to get other dependencies to work.

Vincent Williams
  • 2,836
  • 3
  • 17
  • 22