【发布时间】:2021-10-22 08:20:00
【问题描述】:
美好的一天,今天我将我的应用程序上传到 google play,在我的应用程序的稳定性部分,我似乎遇到了一个 APi 的兼容性问题,不幸的是我不知道它是哪一个,它抛出了以下内容错误:Landroid/图形/字体; -> sSystemFontMap: Ljava / util / Map,然后他们添加了以下内容:
StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Landroid/graphics/Typeface;->sSystemFontMap:Ljava/util/Map;
at android.os.StrictMode.lambda$static$1(StrictMode.java:416)
at android.os.-$$Lambda$StrictMode$lu9ekkHJ2HMz0jd3F8K8MnhenxQ.accept(Unknown Source:2)
at java.lang.Class.getDeclaredField(Native Method)
at androidx.test.tools.crawler.platform.hybrid.TextViewHelper.getSystemFontMap(TextViewHelper.java:3)
at androidx.test.tools.crawler.platform.hybrid.TextViewHelper.<clinit>(TextViewHelper.java:1)
at androidx.test.tools.crawler.platform.hybrid.TextViewHelper.getTextOfTextViewOrEmpty(TextViewHelper.java:1)
at androidx.test.tools.crawler.platform.hybrid.EspressoElement.extractDescription(EspressoElement.java:4)
at androidx.test.tools.crawler.platform.hybrid.EspressoElement.create(EspressoElement.java:2)
at androidx.test.tools.crawler.platform.hybrid.ViewScreenStateBuilder$ViewTreeNode.<init>(ViewScreenStateBuilder.java:1)
at androidx.test.tools.crawler.platform.hybrid.ViewScreenStateBuilder.traverseAndBuild(ViewScreenStateBuilder.java:5)
at androidx.test.tools.crawler.platform.hybrid.HybridStateExtractor.tryExtractingScreenState(HybridStateExtractor.java:9)
at androidx.test.tools.crawler.platform.hybrid.HybridStateExtractor.getStableScreen(HybridStateExtractor.java:2)
at androidx.test.tools.crawler.platform.RemotePlatform.handlePerformScrape(RemotePlatform.java:1)
at androidx.test.tools.crawler.platform.RemotePlatform.messageLoop(RemotePlatform.java:27)
at androidx.test.tools.crawler.platform.RemotePlatform.lambda$startCrawlAndWaitUntilFinished$0$RemotePlatform(RemotePlatform.java:1)
at androidx.test.tools.crawler.platform.RemotePlatform$$ExternalSyntheticLambda0.run(Unknown Source:6)
at java.lang.Thread.run(Thread.java:923)
你指的是什么Api?我能做些什么来解决这个问题?也许我要问的很明显,但我对此很陌生。 非常感谢您的阅读。
【问题讨论】:
-
你的应用程序是 Jetpack compose 应用程序吗?
标签: api google-play