fabulous-dev / Fabulous

Declarative UI framework for cross-platform mobile & desktop apps, using MVU and F# functional programming
https://fabulous.dev
Apache License 2.0
1.16k stars 122 forks source link

AndroidX for Fabulous.XamarinForms.Templates #750

Closed Happypig375 closed 4 years ago

Happypig375 commented 4 years ago

The pull request I mentioned at https://github.com/dotnet/maui/issues/115#issuecomment-635163230.

TimLariviere commented 4 years ago

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

Happypig375 commented 4 years ago

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

Happypig375 commented 4 years ago

Why is Mac build failing?

TimLariviere commented 4 years ago

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 commented 4 years ago

/azp run full build

azure-pipelines[bot] commented 4 years ago
Azure Pipelines successfully started running 1 pipeline(s).
Happypig375 commented 4 years ago

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

TimLariviere commented 4 years ago

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 commented 4 years ago

/azp run full build

azure-pipelines[bot] commented 4 years ago
Commenter does not have sufficient privileges for PR 750 in repo fsprojects/Fabulous
Happypig375 commented 4 years ago

...

TimLariviere commented 4 years ago

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

TimLariviere commented 4 years ago

/azp run full build

azure-pipelines[bot] commented 4 years ago
Azure Pipelines successfully started running 1 pipeline(s).
Happypig375 commented 4 years ago

This commit should be it. Having that property set to true actually makes Visual Studio set TargetFramework to v9.0 and TargetAndroidSDK to 28 instead of 29.

TimLariviere commented 4 years ago

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 commented 4 years ago

Should be. The template executes fine locally.

TimLariviere commented 4 years ago

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

Happypig375 commented 4 years ago

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

TimLariviere commented 4 years ago

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

TimLariviere commented 4 years ago

/azp run full build

azure-pipelines[bot] commented 4 years ago
Azure Pipelines successfully started running 1 pipeline(s).
TimLariviere commented 4 years ago

/azp run full build

azure-pipelines[bot] commented 4 years ago
Azure Pipelines successfully started running 1 pipeline(s).
TimLariviere commented 4 years ago

/azp run full build

azure-pipelines[bot] commented 4 years ago
Azure Pipelines successfully started running 1 pipeline(s).
TimLariviere commented 4 years ago

/azp run full build

azure-pipelines[bot] commented 4 years ago
Azure Pipelines successfully started running 1 pipeline(s).
TimLariviere commented 4 years ago

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 commented 4 years ago

/azp run full build

azure-pipelines[bot] commented 4 years ago
Azure Pipelines successfully started running 1 pipeline(s).
Happypig375 commented 4 years ago

:tada:

TimLariviere commented 4 years ago

/azp run full build

azure-pipelines[bot] commented 4 years ago
Azure Pipelines successfully started running 1 pipeline(s).