NativeScript / NativeScript/android

Greylisted APIs are used by the runtime

Open
#1,537 0 comments 0 reactions 1 assignee View on GitHub

@vmutafov is already working on this.

Since Jan 9, 2020.

Dominant language
C++
Stars
563
Forks
144
Avg merge
10h 46m
Merged PRs (30d)
14

Description

I'm use NativeScript 6.2.0 with Android runtime 6.2.0. When i build my application and publish it Google Play Console, i get the following warnings from "Pre-launch report":

The following APIs are greylisted and Google can’t guarantee that they will work on existing versions of Android. Some may be already be restricted for your target SDK

  1. API Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V
    3 occurrences identified. Only unique stack traces are shown.
StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V
	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 androidx.appcompat.widget.ViewUtils.makeOptionalFitsSystemWindows(ViewUtils.java:84)
	at androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor(AppCompatDelegateImpl.java:798)
	at androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor(AppCompatDelegateImpl.java:630)
	at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:538)
	at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:171)
	at com.tns.Runtime.callJSMethodNative(Native Method)
	at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1286)
	at com.tns.Runtime.callJSMethodImpl(Runtime.java:1173)
	at com.tns.Runtime.callJSMethod(Runtime.java:1160)
	at com.tns.Runtime.callJSMethod(Runtime.java:1138)
	at com.tns.Runtime.callJSMethod(Runtime.java:1134)
	at com.tns.NativeScriptActivity.onCreate(NativeScriptActivity.java:24)
	at android.app.Activity.performCreate(Activity.java:7144)
	at android.app.Activity.performCreate(Activity.java:7135)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
	at androidx.test.runner.MonitoringInstrumentation.callActivityOnCreate(MonitoringInstrumentation.java:184)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2931)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3086)
	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1816)
	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)
  1. API Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z
    2 occurrences identified. Only unique stack traces are shown.
StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z
	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.getMethod(Class.java:2064)
	at java.lang.Class.getDeclaredMethod(Class.java:2047)
	at androidx.appcompat.widget.ViewUtils.<clinit>(ViewUtils.java:44)
	at androidx.appcompat.widget.ViewUtils.makeOptionalFitsSystemWindows(Unknown Source:0)
	at androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor(AppCompatDelegateImpl.java:798)
	at androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor(AppCompatDelegateImpl.java:630)
	at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:538)
	at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:171)
	at com.tns.Runtime.callJSMethodNative(Native Method)
	at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1286)
	at com.tns.Runtime.callJSMethodImpl(Runtime.java:1173)
	at com.tns.Runtime.callJSMethod(Runtime.java:1160)
	at com.tns.Runtime.callJSMethod(Runtime.java:1138)
	at com.tns.Runtime.callJSMethod(Runtime.java:1134)
	at com.tns.NativeScriptActivity.onCreate(NativeScriptActivity.java:24)
	at android.app.Activity.performCreate(Activity.java:7144)
	at android.app.Activity.performCreate(Activity.java:7135)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
	at androidx.test.runner.MonitoringInstrumentation.callActivityOnCreate(MonitoringInstrumentation.java:184)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2931)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3086)
	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1816)
	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)

I'm not sure if there is anything to worry about or if this can be safely ignored. The application seems to work fine though.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.