Android Question Google Pre-launch Report

Paul Leischow

Member
Licensed User
Longtime User
I have uploaded a APK created with B4A to the Google Play Console.
After a short time I receive a pre-launch report with 9 warning identified stating my app is using grey listed API's and Google can't guarantee they will work on existing devices.

As far as I can tell I am using the libraries that come with B4A...
Animation / Audio / ByteConverter / Core / Encryption / GoogleMaps / GPS / InAppBilling3 / JavaObject / JSON / OkHttpUtils2 / Phone / Phone / Reflection / RunTimePermissions / SQL / TTS

The Google warnings start like this and there are 9 in total...
StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Lcom/android/org/conscrypt/OpenSSLSocketImp

StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Lcom/android/org/conscrypt/OpenSSLSocketImp

StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Landroid/os/Message;->flags:I

StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Landroid/os/Message;->recycleUnchecked()V

etc...

Has anyone else experienced this? Should I be concerned as I do not know what these are?
 

Paul Leischow

Member
Licensed User
Longtime User
After some more searching I came across someone else with report warnings and it seems to be common.

Is there a reason why Google does not like these and gives an error?
Is it a problem with the code created using B4A ?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
You can ignore these two:
StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Landroid/os/Message;->flags:I

StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Landroid/os/Message;->recycleUnchecked()V

Don't call DoEvents or Msgbox and these flags will never be accessed.

I'm not sure where the other two come from. If there is more information post it.
 
Upvote 0

Paul Leischow

Member
Licensed User
Longtime User
Here is a couple of stack traces from one of the warnings...
StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Lcom/android/org/conscrypt/OpenSSLSocketImpl;->getAlpnSelectedProtocol()[B
at android.os.StrictMode.lambda$static$1(StrictMode.java:428)
at android.os.-$$Lambda$StrictMode$lu9ekkHJ2HMz0jd3F8K8MnhenxQ.accept(Unknown Source:2)
at java.lang.Class.getDeclaredMethodInternal(Native Method)
at java.lang.Class.getPublicMethodRecursive(Class.java:2075)
at java.lang.Class.getMethod(Class.java:2063)
at java.lang.Class.getMethod(Class.java:1690)
at okhttp3.internal.platform.OptionalMethod.getPublicMethod(OptionalMethod.java:164)
at okhttp3.internal.platform.OptionalMethod.getMethod(OptionalMethod.java:149)
at okhttp3.internal.platform.OptionalMethod.invoke(OptionalMethod.java:106)
at okhttp3.internal.platform.OptionalMethod.invokeWithoutCheckedException(OptionalMethod.java:129)
at okhttp3.internal.platform.AndroidPlatform.getSelectedProtocol(AndroidPlatform.java:117)
at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.java:260)
at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.java:200)
at okhttp3.internal.connection.RealConnection.buildConnection(RealConnection.java:174)
at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:114)
at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:196)
at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:132)
at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:101)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:120)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:179)
at okhttp3.RealCall.execute(RealCall.java:63)
at anywheresoftware.b4h.okhttp.OkHttpClientWrapper.executeWithTimeout(OkHttpClientWrapper.java:156)
at anywheresoftware.b4h.okhttp.OkHttpClientWrapper.access$0(OkHttpClientWrapper.java:153)
at anywheresoftware.b4h.okhttp.OkHttpClientWrapper$ExecuteHelper.run(OkHttpClientWrapper.java:201)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Lcom/android/org/conscrypt/OpenSSLSocketImpl;->getAlpnSelectedProtocol()[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 okhttp3.internal.platform.OptionalMethod.getPublicMethod(OptionalMethod.java:164)
at okhttp3.internal.platform.OptionalMethod.getMethod(OptionalMethod.java:149)
at okhttp3.internal.platform.OptionalMethod.invoke(OptionalMethod.java:106)
at okhttp3.internal.platform.OptionalMethod.invokeWithoutCheckedException(OptionalMethod.java:129)
at okhttp3.internal.platform.AndroidPlatform.getSelectedProtocol(AndroidPlatform.java:117)
at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.java:260)
at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.java:200)
at okhttp3.internal.connection.RealConnection.buildConnection(RealConnection.java:174)
at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:114)
at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:196)
at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:132)
at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:101)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:120)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:179)
at okhttp3.RealCall.execute(RealCall.java:63)
at anywheresoftware.b4h.okhttp.OkHttpClientWrapper.executeWithTimeout(OkHttpClientWrapper.java:156)
at anywheresoftware.b4h.okhttp.OkHttpClientWrapper.access$0(OkHttpClientWrapper.java:153)
at anywheresoftware.b4h.okhttp.OkHttpClientWrapper$ExecuteHelper.run(OkHttpClientWrapper.java:201)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)

and here are a couple from another warning...
StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Ldalvik/system/CloseGuard;->get()Ldalvik/system/CloseGuard;
at android.os.StrictMode.lambda$static$1(StrictMode.java:428)
at android.os.-$$Lambda$StrictMode$lu9ekkHJ2HMz0jd3F8K8MnhenxQ.accept(Unknown Source:2)
at java.lang.Class.getDeclaredMethodInternal(Native Method)
at java.lang.Class.getPublicMethodRecursive(Class.java:2075)
at java.lang.Class.getMethod(Class.java:2063)
at java.lang.Class.getMethod(Class.java:1690)
at okhttp3.internal.platform.AndroidPlatform$CloseGuard.get(AndroidPlatform.java:299)
at okhttp3.internal.platform.AndroidPlatform.<init>(AndroidPlatform.java:48)
at okhttp3.internal.platform.AndroidPlatform.buildIfSupported(AndroidPlatform.java:204)
at okhttp3.internal.platform.Platform.findPlatform(Platform.java:172)
at okhttp3.internal.platform.Platform.<clinit>(Platform.java:73)
at okhttp3.internal.platform.Platform.get(Platform.java:79)
at okhttp3.internal.tls.CertificateChainCleaner.get(CertificateChainCleaner.java:41)
at okhttp3.OkHttpClient.<init>(OkHttpClient.java:234)
at okhttp3.OkHttpClient$Builder.build(OkHttpClient.java:868)
at anywheresoftware.b4h.okhttp.OkHttpClientWrapper.Initialize(OkHttpClientWrapper.java:77)
at ca.warnapp.warn.httputils2service._service_create(httputils2service.java:231)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:176)
at ca.warnapp.warn.httputils2service.onCreate(httputils2service.java:56)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:3570)
at android.app.ActivityThread.access$1300(ActivityThread.java:200)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1672)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6718)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Ldalvik/system/CloseGuard;->get()Ldalvik/system/CloseGuard;
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 okhttp3.internal.platform.AndroidPlatform$CloseGuard.get(AndroidPlatform.java:299)
at okhttp3.internal.platform.AndroidPlatform.<init>(AndroidPlatform.java:48)
at okhttp3.internal.platform.AndroidPlatform.buildIfSupported(AndroidPlatform.java:204)
at okhttp3.internal.platform.Platform.findPlatform(Platform.java:172)
at okhttp3.internal.platform.Platform.<clinit>(Platform.java:73)
at okhttp3.internal.platform.Platform.get(Platform.java:79)
at okhttp3.internal.tls.CertificateChainCleaner.get(CertificateChainCleaner.java:41)
at okhttp3.OkHttpClient.<init>(OkHttpClient.java:234)
at okhttp3.OkHttpClient$Builder.build(OkHttpClient.java:868)
at anywheresoftware.b4h.okhttp.OkHttpClientWrapper.Initialize(OkHttpClientWrapper.java:77)
at ca.warnapp.warn.httputils2service._service_create(httputils2service.java:231)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:176)
at ca.warnapp.warn.httputils2service.onCreate(httputils2service.java:56)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:3757)
at android.app.ActivityThread.access$1300(ActivityThread.java:211)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7116)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:925)
 
Upvote 0
Top