Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot refer to imported jar-library in Android Studio project

I have imported an external jar-library find-local-devices.jar into Android Studio project. I've put it into libs folder, right-clicked and chosen Add as library, ensured about dependency in build.gradle, cleaned and built again the project - everything as described, e.g., here. , but I cannot still use the classes from jar:

enter image description here

Could somebody tell me what I do wrong?

like image 769
Spectorsky Avatar asked Sep 20 '25 04:09

Spectorsky


1 Answers

Try "Invalidate Caches and restart" on Android Studio.

enter image description here

EDIT :

Also try deleting you current module and everything referring to it. And add it as the official google documentation is showing you too. The image is from here : https://developer.android.com/studio/projects/android-library.html

like image 93
James Oanta Avatar answered Sep 22 '25 19:09

James Oanta