Put this line inside your dependencies:
provided files('libs/myandroid.jar')
If still not working, we can add our library to create a classpath. In the build.gradle application, add the following:
allprojects { repositories { jcenter() } gradle.projectsEvaluated { tasks.withType(JavaCompile) { options.compilerArgs.add('-Xbootclasspath/p:app\\libs\\mylibs.jar') } } }
I put mylib.jar in app / libs. There, maybe some errors are displayed in the IDE, but the application build will be fine.
source share