How to resolved http and Site Behavior: Navigation error in android app?

7.9k Views Asked by At

Recently I updated android 9 to android 10 but unfortunately, the app sometimes crashes and gives this error.

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.

I tried using this in manifiest

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

    <uses-library
        android:name="org.apache.http.legacy"
        android:required="false" />

I also added build-gradle (app)

android {
    useLibrary 'org.apache.http.legacy'
    ...}

and also AdMob rejects my app due to Site Behavior: Navigation violation even I checked all links working properly, so How to resolve this issue. thanks

3

There are 3 best solutions below

6
Attaullah On BEST ANSWER

Three of my friends resolved errors by following these steps.

  1. Just request to google this is an error sometimes google fixes this issue without changes in the app.

  2. If not fix from step-1 then it maybe needs to remove ads from MainActivity, especially Interstitial ad.

  3. and also check the app for unlink remote resources.

0
Somen Tushir On

I had same issue. my banner ads cover or overlap the contents of the app. After fixing the banner ads published my app again and issue resolved. So in my opinion check your banner ads and also check any direct link that leads to another app or webpage.

0
David RR. On

I got the same issue on April 2023, in my case on a Android App.

To fix it, I removed all code Related Interstitial Ads, an removed all code related Banner Ads. Yes, I just remove everything related Interstitial and Banners Ads, and well problem solved.

I keep only the Rewarded videos Ads.