Subash
Subash

Reputation: 147

Xamarin forms build success but deploy failed

I receive this warning when ever I try to deploy my Xamarin.Froms app to any device or emulator. Also the deploy fails without any errors. I cannot run my app. Can Any one please help me?

The $(TargetFrameworkVersion) for Xamarin.Forms.Platform.dll (vv8.0) is greater than the $(TargetFrameworkVersion) for your project (v7.1). You need to increase the $(TargetFrameworkVersion) for your project. App2.Android C:\Users\subas\source\repos\App2\App2\App2.Android\App2.Android.csproj

Upvotes: 1

Views: 1941

Answers (1)

Matt Soucoup
Matt Soucoup

Reputation: 186

EDIT/UPDATE

Right now JDK9 and the Android SDK tools are not compatible with each other - thus Xamarin.Android does not work with JDK9.

Run the following to see the version of java you have installed:

java -version

If it reports something along the lines of java version "9.0.4" you have JDK9.

Specifically there's an issue with the apksigner. It's not using the -classpath switch that the JDK expects.

Easiest way to fix is to install the JDK8 and make sure your PATH is pointed at it.

This documentation gives a solid overview.

ORIGINAL

Sounds like the target Android framework in the project needs to be updated to point to the latest version of Android.

First - make sure you have the latest Android SDKs installed. Here's some documentation on that.

Once you have the latest - here is how to make sure you're targeting the latest - depending on the IDE you're using:

Visual Studio Mac

  1. In the solution explorer, right click the Android project and select options.
  2. Under the Build -> General node - select "Use latest installed platform" from the Target Framework dropdown.
  3. Save everything, close the solution, restart VS-Mac

Visual Studio

  1. Right click the Android project in the solution explorer and select properties
  2. Under the Application node, select Use Latest Platform from the Compile Using Android Version dropdown.
  3. Save everything, close the solution, restart Visual Studio

Upvotes: 2

Related Questions