Coder Social home page Coder Social logo

erros when compiling a blank solution Avalonia 11.06 with avalonia.maui and net8.0 and communitytoolkit.mvvm 8.2.2 about avaloniamauihybrid HOT 6 CLOSED

avaloniaui avatar avaloniaui commented on August 10, 2024
erros when compiling a blank solution Avalonia 11.06 with avalonia.maui and net8.0 and communitytoolkit.mvvm 8.2.2

from avaloniamauihybrid.

Comments (6)

CastelloBrancoTecnologia avatar CastelloBrancoTecnologia commented on August 10, 2024

After updating Avalonia packages to latest pre release build packages 11.99999 i can compile avalonia hibrid

from avaloniamauihybrid.

CastelloBrancoTecnologia avatar CastelloBrancoTecnologia commented on August 10, 2024

I succefuly fixed it (android compiling erros with net 8 and avalonia 11.0.7) forking avalonia hybrid, changing project file to only use net8 (removing net7), updating packages refenrence to latest versions and adding these two references

		<PackageReference Include="Xamarin.AndroidX.Collection" Version="1.3.0.2" />
		<PackageReference Include="Xamarin.AndroidX.Collection.Ktx" Version="1.3.0.2" />

the resulting Avalonia.MAUI project file is

<Project Sdk="Microsoft.NET.Sdk">
	<PropertyGroup>
		<TargetFrameworks>net8.0;net8.0-android;net8.0-ios</TargetFrameworks>
		<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
		<!-- <TargetFrameworks>$(TargetFrameworks);net8.0-tizen</TargetFrameworks> -->
		<UseMaui>true</UseMaui>
		<SkipValidateMauiImplicitPackageReferences>true</SkipValidateMauiImplicitPackageReferences>
		<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
		<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
		<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
		<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
		<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
		<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
	</PropertyGroup>

	<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">
		<PackageReference Include="Avalonia.Android" Version="$(AvaloniaVersion)" />
		<!--<PackageReference Include="Xamarin.Kotlin.StdLib.Jdk8" Version="1.9.22" />-->
		<PackageReference Include="SkiaSharp.NativeAssets.Android" Version="2.88.7" />
		<PackageReference Include="HarfBuzzSharp.NativeAssets.Android" Version="7.3.0.1" />
		<PackageReference Include="Xamarin.AndroidX.Collection" Version="1.3.0.2" />
		<PackageReference Include="Xamarin.AndroidX.Collection.Ktx" Version="1.3.0.2" />
	</ItemGroup>
	
	<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">
		<PackageReference Include="Avalonia.iOS" Version="$(AvaloniaVersion)" />
		<PackageReference Include="SkiaSharp.NativeAssets.iOS" Version="2.88.7" />
		<PackageReference Include="HarfBuzzSharp.NativeAssets.iOS" Version="7.3.0.1" />
	</ItemGroup>
	
    <ItemGroup>
		<PackageReference Include="Avalonia" Version="11.0.7" />
    </ItemGroup>

	<ItemGroup>
		<PackageReference Update="Microsoft.Maui.Controls" Version="8.0.6" />
		<PackageReference Update="Microsoft.Maui.Controls.Compatibility" Version="8.0.6" />
	</ItemGroup>
	
	<ItemGroup>
		<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
		<PackageReference Include="DotNet.ReproducibleBuilds" Version="1.1.1" PrivateAssets="All" />
	</ItemGroup>

	<!-- Packaging -->
	<PropertyGroup>
		<IsPackable>true</IsPackable>
		<Version>11.0.5.2</Version>
		<PackageLicenseExpression>MIT</PackageLicenseExpression>
		<RepositoryUrl>https://github.com/AvaloniaUI/AvaloniaMauiHybrid</RepositoryUrl>
		<PackageTags>avalonia;avaloniaui;maui;android</PackageTags>
		<PublishRepositoryUrl>true</PublishRepositoryUrl>
		<EmbedUntrackedSources>true</EmbedUntrackedSources>
		<IncludeSymbols>true</IncludeSymbols>
		<SymbolPackageFormat>snupkg</SymbolPackageFormat>
		<PackageIcon>Icon.png</PackageIcon>
		<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
		<PackageId>CBT.$(AssemblyName)</PackageId>
	</PropertyGroup>

	<ItemGroup Label="PackageIcon">
		<None Include="Icon.png" Pack="true" Visible="false" PackagePath="" />
	</ItemGroup>
	<!-- /Packaging -->

	<Target Name="PushNuGetPackage" AfterTargets="GenerateNuspec">
		<Message Text="Push NuGet Package to NuGet Feed" Importance="high"></Message>
		<Exec Command="dotnet nuget push &quot;$(ProjectDir)bin\$(Configuration)\CBT.$(AssemblyName).$(Version).nupkg&quot; --source &quot;github&quot;"></Exec>
	</Target>
</Project>


from avaloniamauihybrid.

cesarchefinho avatar cesarchefinho commented on August 10, 2024

can somdone see this information and integrete it to next version of avalonia hybrid ?

from avaloniamauihybrid.

curia-damiano avatar curia-damiano commented on August 10, 2024

I have the same issue:

  • NET 8
  • Avalonia 11.0.8

So at the moment I need to stay on Avalonia 11.0.5

from avaloniamauihybrid.

maxkatz6 avatar maxkatz6 commented on August 10, 2024

Should work better with 11.0.9 (or 7+) and Avalonia.Maui 11.0.9

from avaloniamauihybrid.

maxkatz6 avatar maxkatz6 commented on August 10, 2024

For future reference, any AndroidX version conflict issues should be reported to the https://github.com/xamarin/AndroidX repository.

from avaloniamauihybrid.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.