flutter_reactive_ble icon indicating copy to clipboard operation
flutter_reactive_ble copied to clipboard

Usage of nonSDK and deprecated API

Open thomasklaush opened this issue 3 years ago • 1 comments

Describe the bug When uploading the App bundle to google play console, the pre-launch-test finds many warnings from the reactive ble lib;

API: Llibcore/io/Memory;->peekByte(J)B

StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Llibcore/io/Memory;->peekByte(J)B
	at android.os.StrictMode.lambda$static$1(StrictMode.java:407)
	at android.os.-$$Lambda$StrictMode$lu9ekkHJ2HMz0jd3F8K8MnhenxQ.accept(Unknown Source:2)
	at java.lang.Class.getDeclaredMethodInternal(Native Method)
	at java.lang.Class.getPublicMethodRecursive(Class.java:2079)
	at java.lang.Class.getMethod(Class.java:2066)
	at java.lang.Class.getMethod(Class.java:1693)
	at com.google.protobuf.t0.q(Unknown Source:88)
	at com.google.protobuf.t0.<clinit>(Unknown Source:26)
	at com.google.protobuf.t0.B(Unknown Source:0)
	at com.google.protobuf.V.<clinit>(Unknown Source:5)
	at com.google.protobuf.V.z(Unknown Source:0)
	at com.google.protobuf.J.a(:5)
	at com.google.protobuf.d0.b(:2)
	at com.google.protobuf.d0.c(Unknown Source:4)
	at com.google.protobuf.y.makeImmutable(Unknown Source:4)
	at com.google.protobuf.y$a.buildPartial(Unknown Source:9)
	at com.google.protobuf.y$a.build(Unknown Source:0)
	at com.signify.hue.flutterreactiveble.channelhandlers.BleStatusHandler.listenToBleStatus$lambda-1(Unknown Source:17)
	at com.signify.hue.flutterreactiveble.channelhandlers.BleStatusHandler.c(Unknown Source:0)
	at com.signify.hue.flutterreactiveble.channelhandlers.a.accept(Unknown Source:10)
	at F2.h.onNext(Unknown Source:8)
	at K2.H$a.run(:2)
	at y2.b$b.run(Unknown Source:2)
	at android.os.Handler.handleCallback(Handler.java:883)
	at android.os.Handler.dispatchMessage(Handler.java:100)
	at android.os.Looper.loop(Looper.java:237)
	at android.app.ActivityThread.main(ActivityThread.java:8016)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1076)

Other APIS with warnings;

Llibcore/io/Memory;->peekByteArray(J[BII)V

Llibcore/io/Memory;->peekInt(JZ)I

Llibcore/io/Memory;->peekLong(JZ)J

Llibcore/io/Memory;->pokeByte(JB)V

Llibcore/io/Memory;->pokeInt(JIZ)V

Llibcore/io/Memory;->pokeLong(JJZ)V

Lsun/misc/Unsafe;->getInt(Ljava/lang/Object;J)I

Lsun/misc/Unsafe;->getLong(Ljava/lang/Object;J)J

Lsun/misc/Unsafe;->getObject(Ljava/lang/Object;J)Ljava/lang/Object;

Lsun/misc/Unsafe;->objectFieldOffset(Ljava/lang/reflect/Field;)J

Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V

thomasklaush avatar Dec 13 '21 05:12 thomasklaush

Thanks for reporting there is little we can do about it since this seems to be related to protobuf. However I see we lack one minor version behind so I can upgrade that one and hopefully they fixed it.

remonh87 avatar Dec 13 '21 08:12 remonh87