You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ERROR: Missing classes detected while running R8. Please add the missing classes or apply additional keep rules that are generated in /Users/msmith/git/chaquo/chaquopy/product/gradle-plugin/build/test/integration/8.0/JavaLib/minify/project/app/build/outputs/mapping/debug/missing_rules.txt. ERROR: R8: Missing class org.jetbrains.annotations.NotNull (referenced from: java.lang.String com.chaquo.python.Kwarg.key and 34 other contexts)
For now it can be worked around by adding this line to the project's proguard-rules.pro file:
-dontwarn org.jetbrains.annotations.NotNull
Keywords: minify
The text was updated successfully, but these errors were encountered:
First, remove the dontwarn workaround which I put in the plugin's proguard-rules.pro file.
NotNull is provided by org.jetbrains:annotations-java5:15.0, which is a dependency of the Chaquopy Java library. Changing the dependency scope from implementation to compile didn't help, but it's probably a good idea to do that anyway, since the annotations are part of the public API.
I suspect the annotations library isn't being included in the app build because the plugin adds the Chaquopy library indirectly, by creating a configuration in the buildscript project and then wrapping it with files to bring it into the app module. Start off by examining exactly which files are being returned by files. Perhaps we need to "resolve" the configuration before using it.
This has always been an awkward area, so check the previous related issues to make sure we don't cause any regressions.
mhsmith
changed the title
R8: Missing class org.jetbrains.annotations.NotNull
R8: Missing class org.jetbrains.annotations.NotNull when minifyEnabled is true
Apr 4, 2023
When I originally created this issue, I think I could reproduce it with the Chaquopy development version and the AGP 8.0 RC. I can still reproduce it by running JavaLib.test_minify with Chaquopy 14.0.2 and AGP 8.0.1. But I can't reproduce it with the development version of Chaquopy anymore, either on Mac or Linux.
I've no idea why this has happened, but unless it comes up again, I don't think it's worth looking into any further.
This was a warning in older AGP versions, but it's become an error in AGP 8.0:
ERROR: Missing classes detected while running R8. Please add the missing classes or apply additional keep rules that are generated in /Users/msmith/git/chaquo/chaquopy/product/gradle-plugin/build/test/integration/8.0/JavaLib/minify/project/app/build/outputs/mapping/debug/missing_rules.txt.
ERROR: R8: Missing class org.jetbrains.annotations.NotNull (referenced from: java.lang.String com.chaquo.python.Kwarg.key and 34 other contexts)
For now it can be worked around by adding this line to the project's proguard-rules.pro file:
Keywords: minify
The text was updated successfully, but these errors were encountered: