Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

XF 2.5 build failed targeting Xamarin.Android 7.0 or 6.0 #2016

Closed
yunusefendi52 opened this issue Mar 5, 2018 · 8 comments
Closed

XF 2.5 build failed targeting Xamarin.Android 7.0 or 6.0 #2016

yunusefendi52 opened this issue Mar 5, 2018 · 8 comments

Comments

@yunusefendi52
Copy link

Description

I want to create an app using XF 2.5 with Xamarin.Android 7.0, but it says build failed with the following error:

capture

So the only workaround right now is to target Xamarin.Android 7.1 or above.

Steps to Reproduce

  1. Create Xamarin.Forms project
  2. Add XF 2.5 on NuGet
  3. Build the project

Expected Behavior

Build success and I can run the app

Actual Behavior

Shows "Build error"

@hartez
Copy link
Contributor

hartez commented Mar 6, 2018

@5yunus2efendi Which build of the 2.5 NuGet package are you using (e.g., 2.5.0.122203, 2.5.0.280555)?

In your Android project settings, on the Application tab, what is selected for "Compile using Android version: (Target Framework)"? And on the Android Manifest tab, what is selected for "Minimum Android version" and "Target Android version"?

@hartez hartez added the s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. label Mar 6, 2018
@yunusefendi52
Copy link
Author

yunusefendi52 commented Mar 6, 2018

XF version: 2.5.1.317207-pre1 or 2.5.0.280555 (both has the same issue), but AFAIK the issue is starting from XF 2.5 first released
Compile using Android version: (Target Framework): Android 7.0 or Android 6.0 (both has the same issue)
Minimum Android version: Android 4.0.3 (API Level 15)
Target Android version: Use Compile using SDK version

@rmarinho
Copy link
Member

rmarinho commented Mar 6, 2018

this is a issue restoring packages and the target version was still Android 6.0 and there's no Support for fragments there. Solutions is update your androdi csproj to 7.0. and then install Xamarin.Forms

@hartez
Copy link
Contributor

hartez commented Mar 8, 2018

@5yunus2efendi 2.5 is not compatible with Android 6. Android 7 should work fine. If you're seeing this issue while targeting 7, you may need to completely remove the Forms packages, restart Visual Studio, and re-add the Forms packages.

I apologize, we realize it's not the best update experience. There is some work in progress to make the feedback during the NuGet update process more helpful and to make the package manager UI better about indicating which packages are compatible with your project.

@yunusefendi52
Copy link
Author

yunusefendi52 commented Mar 8, 2018

I am sorry, I forgot to mention that I changed Xamarin.Android.Support to 23.3.0 because XF 2.5 for Xamarin.Android 6 or 7 has minimum dependencies Xamarin.Android.Support 23.3.0, note that I need Xamarin.Android.Support 23.3.0 is because when the app released, the size of it's app is relatively small than Xamarin.Android.Support 24 or above, I also have an app that target 2.4.* and it's size is relatively small

Here is the repro of the issue
App2.zip

@hartez hartez removed the s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. label Mar 9, 2018
@pauldipietro
Copy link
Contributor

On a cursory look over, it appears the project shows the build error in question when trying to build.

@yunusefendi52
Copy link
Author

Any update on this?

@yunusefendi52
Copy link
Author

I'll close this one

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants