Cannot Create and Run Even Basic Xamarin Forms Android App.

RobertTRobertT USMember ✭✭

Using VS 2019 Ver 16.0.3 just updated today. Created a Blank Xamarin Forms App for Android. App will not build!

Getting this verbose error.

Severity Code Description Project File Line Suppression State
Error Failed to create JavaTypeInfo for class: Android.Support.V4.View.Accessibility.AccessibilityManagerCompat/IAccessibilityStateChangeListenerImplementor due to System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\XXXX\Documents\Visual Studio 2017\Projects\Xamarin\Samples\TestCreateApp\TestCreateApp\TestCreateApp.Android\obj\Debug\81\android\src\mono\android\support\v4\view\accessibility\'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
at Xamarin.Android.Tools.Files.CopyIfStreamChanged(Stream stream, String destination)
at Xamarin.Android.Tasks.Generator.CreateJavaSources(TaskLoggingHelper log, IEnumerable`1 javaTypes, String outputPath, String applicationJavaClass, Boolean useSharedRuntime, Boolean generateOnCreateOverrides, Boolean hasExportReference) TestCreateApp.Android

Help please.


  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    As a test I just tried it. Runs fine. So its not 16.0.3 or the framework or the templates.
    Something on your PC.
    Did you try turning off and back on again?

  • RobertTRobertT USMember ✭✭

    Hi, Thanks for the reply.

    It appears to be an issue with the Android Version. I have done most of my previous development on a Android 7.1 emulator instance. It has worked well up till now. I changed my Compile using Android version to 7.1 and I no longer get the huge something missing error.

    Now, however, I get
    Error The $(TargetFrameworkVersion) for App1.Android (v7.1) is less than the minimum required $(TargetFrameworkVersion) for Xamarin.Forms (8.1). You need to increase the $(TargetFrameworkVersion) for App1.Android. App1.Android

    There is no longer a choice for Android version on the template for Xamarin Forms. I have had trouble trying to get my Android 8.1 emulator to work. I also like to design for slightly older Android versions. Like Marshmallow so it is more compatible.

    Still can't get a simple Xamarin Android Project to work

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    To be clear: That working screenshot is from Android on a physical device.

    I'll double check the compile and target versions when I get back to work in the morning.

Sign In or Register to comment.