-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Google Play Store Console pre-launch report shows errors due to usage of non-SDK API classes #1678
Comments
As suggested by @Ali-RS , we will try to migrate |
This has nothing to do with the fix... I was testing some android apps today, and i noticed these in logcat : W/ojmesurfacevie: Accessing hidden method Lsun/nio/ch/DirectBuffer;->attachment()Ljava/lang/Object; (blacklist, reflection, denied)
W/ojmesurfacevie: Accessing hidden field Ljava/nio/ByteBufferAsFloatBuffer;->bb:Ljava/nio/ByteBuffer; (blacklist, reflection, denied)
Accessing hidden field Ljava/nio/ByteBufferAsIntBuffer;->bb:Ljava/nio/ByteBuffer; (blacklist, reflection, denied)
Accessing hidden field Ljava/nio/ByteBufferAsDoubleBuffer;->bb:Ljava/nio/ByteBuffer; (blacklist, reflection, denied)
Accessing hidden field Ljava/nio/ByteBufferAsShortBuffer;->bb:Ljava/nio/ByteBuffer; (blacklist, reflection, denied)
Accessing hidden field Ljava/nio/ByteBufferAsLongBuffer;->bb:Ljava/nio/ByteBuffer; (blacklist, reflection, denied)
W/ojmesurfacevie: Accessing hidden field Ljava/nio/ByteBufferAsCharBuffer;->bb:Ljava/nio/ByteBuffer; (blacklist, reflection, denied) They implies what @digitprop has stated, so they are considered blacklist and of denied access... Off topic note : W/ojmesurfacevie: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection, allowed)
W/ojmesurfacevie: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed) I can also see some reflection api calls that are denied as well (but don't know why, still searching to get better understanding of logs). |
@Scrappers-glitch Sorry for the late reply! I'd be happy to test the migration to a native binding. If you ping me I'll try it out. |
When submitting an Android JME app in the Google Play Store, for target API level 30 and higher, the Play Store Console reports multiple errors. These are due to AndroidBufferAllocator accessing fields of java.nio.ByteBufferAsFloat and similar (ByteBufferAsChar, ByteBufferAsInt, etc). These classes are not part of the SDK-approved Android API, and as such their use is not allowed for API levels 30 and higher.
This is the stack trace:
This is the static initializer of AndroidBufferAllocator where the error occurs:
Workaround: Replace AndroidBufferAllocator by an implementation which does nothing on destroyDirectBuffer(Buffer), such as PrimitiveAllocator. This can be done by setting the system property com.jme3.BufferAllocatorImplementation to the full class name of the replacing Allocator during startup / initialization.
Up until API level 29 this was not a problem, as the affected classes where gray-listed. However, recently Google made API level 30 the mandatory target level for releases on the play store.
See also forum entry AndroidBufferAllocator and NonSdkApiUsedViolation.
The text was updated successfully, but these errors were encountered: