NativeScript / NativeScript/android

Greylisted APIs are used by the runtime

未关闭
#1,537 0 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

@vmutafov 已经在做这个了。

开始于 2020年1月9日。

主要语言
C++
星标
563
派生
144
平均合并
10 小时 46 分钟
30 天内合并 PR
14

描述

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.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。