Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
The setAllowUniversalAccessFromFileURLs method of WebSettings was added in API
16, but it does not appear to be present in the Mono for Android API 4.2.6.
This is a duplicate of Issue#7775.
This is a critical issue now as this does not allow the Xamarin based Android Applications built on top of WebView not to run the web application whose minimim sdk version is set to 19.
How to reproduce the issue ::::
Create a webview Android WebView Application using Xamarin Studio.
Make sure the assets does have the html files and js files
Build the Android package and run the application on the device.
Expected Result : Android application should show the pages created
Actual Result : Android application is invoked with a white screen
Many Java methods are mapped to C# properties, particularly if there is a get and set method with the same suffix and matching values:
In this case, WebSettings.setAllowUniversalAccessFromFileURLs(boolean) was mapped to the WebSettings.AllowUniversalAccessFromFileURLs property:
*** Bug 7775 has been marked as a duplicate of this bug. ***
Created attachment 8349 [details]
`Android.Webkit.WebSettings' does not contain a definition for `AllowUniversalAccessFromFileURLs' Error
After your suggestion we have tried to use AllowUniversalAccessFromFileURLs property. But we could not find this as well. PFA error(Error CS0117: `Android.Webkit.WebSettings' does not contain a definition for `AllowUniversalAccessFromFileURLs' (CS0117) ) screen shot for your reference. Also we have browsed WebSettings methods and properties in the assembly browser, still no luck. Please advise.
Please find the comments from Satya,
What is your $(TargetFrameworkVersion)? WebSettings.AllowUniversalAccessFromFileURLs was added in API-16, so your $(TargetFrameworkVersion) must be v4.1 or higher.
After changing the targetFramework version it works fine.Thanks a lot Jonathan.
As per comment 6, this issue is working fine now.
Hence closing this issue.