简体   繁体   English

Xamarin Forms Android.APK vs.AAB(捆绑)

[英]Xamarin Forms Android .APK vs .AAB (Bundle)

I am having issues with a cross-platform Xamarin Forms app I created using Visual Studio 2019 and 2022. I use SQLite in the app.我在使用 Visual Studio 2019 和 2022 创建的跨平台 Xamarin Forms 应用程序时遇到问题。我在应用程序中使用 SQLite。

Basically, when I set the property Android Package Format to apk and run the app on Android device or Emulator everything works fine.基本上,当我将属性 Android Package 格式设置为 apk 并在 Android 设备或模拟器上运行应用程序时,一切正常。

But when I set the property Android Package Format to bundle (that produces.aab file), I get SQLite exception saying "Cannot Create Table Without Columns... Does (Models.TableName) Contains Public Properties?"但是,当我将属性 Android Package 格式设置为捆绑(生成.aab 文件)时,我得到 SQLite 异常说“无法创建没有公共属性表的表。...”

I have tried different App properties for Android including Link Sdk and Users Assemblies with no luck.我已经为 Android 尝试了不同的应用程序属性,包括链接 Sdk 和用户程序集,但没有运气。

Does anybody know why SQLite works in.apk package but not in bundle(.aab)?有谁知道为什么 SQLite 在.apk package 中有效,但在 bundle(.aab) 中无效?

Many thanks非常感谢

BTW, all the columns in the table contains are set to public.顺便说一句,表中包含的所有列都设置为公共。

I am using this library and works with apk or aab我正在使用这个库并使用 apk 或 aab

https://www.nuget.org/packages/sqlite-net-pcl/ https://www.nuget.org/packages/sqlite-net-pcl/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM