Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AndroidX for Fabulous.XamarinForms.Templates #750

Merged
merged 24 commits into from
May 31, 2020

Conversation

Happypig375
Copy link

The pull request I mentioned at dotnet/maui#115 (comment).

Copy link
Member

@TimLariviere TimLariviere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much! That's some tedious work you did. Much appreciated.

Did you noticed some issues when using AndroidX and Xamarin.Forms?
Last time I tried to migrate the Fabimals sample, it was crashing because of a null reference exception in Shell.

@TimLariviere
Copy link
Member

I guess the build issue is linked to the missing Xamarin.Android.FSharp.targets.

@Happypig375
Copy link
Author

I don't use Shell, and I haven't noticed anything wrong with my app yet.

@Happypig375
Copy link
Author

Why is Mac build failing?

@TimLariviere
Copy link
Member

From the build logs:

This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ../packages/Xamarin.AndroidX.MultiDex.2.0.1/build/monoandroid90/Xamarin.AndroidX.MultiDex.targets.

@TimLariviere
Copy link
Member

/azp run full build

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Happypig375
Copy link
Author

I can't figure out why this is failing. The package list should be correct.

@TimLariviere
Copy link
Member

I missed that the import of NuGet.targets was removed. So Android weren't restoring its packages.
But now, it is complaining about resource style/Theme.AppCompat.Light.Dialog (aka com.companyname:style/Theme.AppCompat.Light.Dialog) not found..

@Happypig375
Copy link
Author

/azp run full build

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 750 in repo fsprojects/Fabulous

@Happypig375
Copy link
Author

...

@TimLariviere
Copy link
Member

Yeah, sorry for that. Azure DevOps is restrictive on that.

@TimLariviere
Copy link
Member

/azp run full build

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@TimLariviere
Copy link
Member

Hmm. Is it because MSBuild picks the wrong version of the Android Build tools?

_ResolveMonoAndroidSdks:
  MonoAndroid Tools: /Library/Frameworks/Xamarin.Android.framework/Libraries/xbuild/Xamarin/Android/
  Android Platform API level: 29
  TargetFrameworkVersion: v10.0
  Android NDK: /Users/runner/Library/Android/sdk/ndk-bundle/
  Android SDK: /Users/runner/Library/Android/sdk/
  Android SDK Build Tools: /Users/runner/Library/Android/sdk/build-tools/28.0.3/
  Java SDK: /Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/
  Application Java class: android.app.Application

@Happypig375
Copy link
Author

Should be. The template executes fine locally.

@TimLariviere
Copy link
Member

It doesn't seem to be that. Let's try bumping Mono to the latest version.

@Happypig375
Copy link
Author

@TimLariviere Can you verify that the template executes successfully locally? It does on my side.

@TimLariviere
Copy link
Member

I have indeed the same issue locally. I'm investigating why.

@TimLariviere
Copy link
Member

/azp run full build

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@TimLariviere
Copy link
Member

/azp run full build

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@TimLariviere
Copy link
Member

/azp run full build

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@TimLariviere
Copy link
Member

/azp run full build

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@TimLariviere
Copy link
Member

Ok. Seems like it was an issue with the NuGet restore process.
I removed the .nuget folder and manually ran nuget restore before building the templates.
NuGet.targets was an old way of restoring packages and I finally managed to get rid of it.

@TimLariviere
Copy link
Member

/azp run full build

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Happypig375
Copy link
Author

🎉

Copy link
Member

@TimLariviere TimLariviere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested the new templates with Visual Studio, Visual Studio for Mac and JetBrains Rider (macOS).
Everything works as expected.
Good job!

@TimLariviere
Copy link
Member

/azp run full build

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@TimLariviere TimLariviere merged commit 387c64d into fabulous-dev:master May 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants