The issue you're encountering with your MAUI .NET 10 app crashing on startup when installed from the Google Play Store, specifically the UnsatisfiedLinkError, suggests that there may be a problem with the native libraries not being loaded correctly. Here are some troubleshooting steps you can consider:
- Ensure Native Libraries are Included: Make sure that the native libraries your application depends on are included in the APK. Sometimes, during the build process, certain libraries may not be packaged correctly.
- Check for ProGuard/R8 Configuration: If you're using code shrinking (trimming), ensure that your ProGuard or R8 configuration is not stripping out necessary native methods. You might need to add rules to keep the required classes and methods.
- Verify Application Permissions: Ensure that your application has the necessary permissions defined in the Android manifest, especially if the library requires specific permissions to function.
- Test Different Build Configurations: Since the app works in debug and release modes on an emulator or connected device, try creating a signed APK and testing it on a physical device to replicate the issue.
- Check for ABI Compatibility: Make sure that the APK is built for the correct ABI (Application Binary Interface) that matches the device architecture. If the device architecture is not supported, it could lead to crashes.
- Logcat Analysis: Since you're not seeing any logs, ensure that you have proper logging enabled and check the logcat output for any other errors or warnings that might give you more context about the crash.
- Disable Fast Deployment: If you haven't already, consider disabling Fast Deployment by setting
EmbedAssembliesIntoApk = Truein your project file. This can help with issues related to native crashes.
If these steps do not resolve the issue, consider filing an issue with detailed logs and information on the MAUI GitHub repository for further assistance.
References: