Skip to content

In .NET9, PowerSync.Maui nuget 0.1.1 reports platform not supported on Android #58

@wizardness

Description

@wizardness

I think this is just a nuget publishing issue, and might apply to all the not-.NET8 versions.

One cause seems to be that the nuget package does not correctly respect the #if ANDROID conditionals in MAUISQLiteAdapter.

I worked around it by cloning the MAUISQLiteAdapter and MAUISQLiteDBOpenFactory classes.

Another issue is then that libpowersync.so is not found when running db.LoadExtension("libpowersync");

I worked around that by explicitly including the .aar from the .NET8 nuget package:

.csproj:

<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">
        <AndroidLibrary Include="$(NuGetPackageRoot)powersync.maui\0.1.1\lib\net8.0-android34.0\PowerSync.Maui.aar"
                        Bind="false" />
</ItemGroup>

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions