如何解决 http 和站点行为:Android 应用程序中的导航错误?

Att*_*lah 5 android admob androidhttpclient

最近我将 android 9 更新到了 android 10,但不幸的是,该应用程序有时会崩溃并出现此错误。

com.fgapps.maker E/chromium: [ERROR:cookie_manager.cc(137)] Strict Secure Cookie policy does not 
allow setting a secure cookie for http://googleads.g.doubleclick.net/ for apps targeting >= R. 
Please either use the 'https:' scheme for this URL or omit the 'Secure' directive in the cookie value.
Run Code Online (Sandbox Code Playgroud)

我尝试在清单中使用它

   <application
        android:hardwareAccelerated="false"
        android:networkSecurityConfig="@xml/network_security_config"
        android:usesCleartextTraffic="true"
        ....>

    <uses-library
        android:name="org.apache.http.legacy"
        android:required="false" />
Run Code Online (Sandbox Code Playgroud)

我还添加了 build-gradle (app)

android {
    useLibrary 'org.apache.http.legacy'
    ...}
Run Code Online (Sandbox Code Playgroud)

Site Behavior: Navigation即使我检查了所有链接都正常工作,AdMob 也会因为违规而拒绝我的应用,所以如何解决这个问题。谢谢

Att*_*lah 2

我的三个朋友按照以下步骤解决了错误。

  1. 只需向谷歌请求这是一个错误,有时谷歌会修复此问题而无需更改应用程序。

  2. 如果在步骤 1 中没有修复,则可能需要从 MainActivity 中删除广告,尤其是插页式广告。

  3. 并检查应用程序是否取消链接远程资源。