Closed
Description
I'm seeing the following Android lint error when upgrading from 1.3.5
to 1.3.6
Package not included in Android
../../../../../../.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-core/1.3.6/84cc2e5a484555e49e908fd831ff503303401dd0/kotlinx-coroutines-core-1.3.6.jar: Invalid package reference in org.jetbrains.kotlinx:kotlinx-coroutines-core; not included in Android: java.lang.instrument. Referenced from kotlinx.coroutines.debug.AgentPremain.
This check scans through libraries looking for calls to APIs that are not included in Android.
When you create Android projects, the classpath is set up such that you can only access classes in the API packages that are included in Android. However, if you add other projects to your libs/ folder, there is no guarantee that those .jar files were built with an Android specific classpath, and in particular, they could be accessing unsupported APIs such as java.applet.
This check scans through library jars and looks for references to API packages that are not included in Android and flags these. This is only an error if your code calls one of the library classes which wind up referencing the unsupported package.
To suppress this error, use the issue id "InvalidPackage" as explained in the Suppressing Warnings and Errors section.