Ok, this is going to be a really stupid question but I can't figure out a solution. So I added a .jar file to Android Studio the following way:
libs
folder under app
folder in the Project view in Android Studio The line compile files('libs/MyJar.jar')
was added to the build.gradle file. However I cannot figure out how to actually use the classes in the jar. I can't seem to import it at all, and it is as if I didn't actually add anything. What am I doing wrong?
I know this is an idiotic question, but I can't find a solution.
如果按照您的说明添加了jar,并且在添加jar后gradle成功构建,那么您就可以开始在Activity中进行编码,系统会提示您将关联的类文件导入.jar。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.