I'm playing around with an Android app from a vendor that our company might be doing business with (so for legal reasons I'll leave out any names). They sent me the source including a compiled .jar library that exposes Android's hidden classes (like android.os.SystemProperties) as well as enables hardware-specific functionality.
I imported their project and the library following this process here, but when trying to build I get,
"error: cannot find symbol method Foo() in class Bar"
for several methods used throughout the code. I inspected the library and found that these methods do indeed exist, so if the library imported successfully (which I assume because there are no errors concerning the hidden classes), why won't it find those variables?
I believe this is an issue of Android Studio looking up the class name "Bar", finding it in the SDK, and stopping there without checking the library .jar because when I right-click on the class in question, and select "Go To Declaration," it takes me to the SDK class, not the library class. Any help is appreciated!
(Potentially) useful info:
- Android Studio v1.4
- JRE 1.8.0_60-b27 amd64
- Gradle v2.2.1 (jcenter repo)
- Android Plugin Version: 1.3.0
- Compile SDK: API 19: Android 4.4 (KitKat)
- Build Tools Version: 23.0.1
EDIT:
I guess I should clarify: The .jar library I have has structure like
+-- library.jar
| +-- android
| | +-- app
| | +-- content
| | +-- graphics
| | | +-- PixelFormat
...
etc.