How to Fix Webview is vulnerable to cross app scripting Error Google Play Warning in Android Studio
Have you faced this warning in your google play development console? That’s because your app has a Webview that is not safe for the users.
If Webview isn’t safe, attackers can steal data such as cookies of users, card details, login details etc, so as a developer, it is our responsibility to ensure that data of our users are safe when they are using our apps.
Fixing the Android Webview is vulnerable to cross scripting Error
There are some options to fix this issue, It is easy to fix this error
Update: If you are converting your website to android app using Webview, check out our Advanced Plus Webview Source code, It is the easiest and powerful Webview source code that you can use to convert website to app in less than 30 mins. check it out here
Go to the android Manifest, and if the web activity has the “android:exported=”true““, “Change it to “android:exported=”false“”
This is the google recommended way to fix the problem, but this is not useful for your app if it needs receive data from external apps. in that case, we will try option B
Go to the manifest, and add the following lines in the Webview activity, see the screenshot to get a clear understanding
<meta-data android:name="android.webkit.WebView.EnableSafeBrowsing" android:value="true" />
That’s it. Let me know in the comments if this fixed your issue
This Post Has 4 Comments
Not work for me.
Hi, try the option B and re upload app to play console
I have no WebView in dependencies tree, but i still receive this warning
It is not so simple!