Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EasyLocalization seems not to be compatible with the latest SharedPreferences build #704

Open
rekire opened this issue Aug 25, 2024 · 0 comments

Comments

@rekire
Copy link

rekire commented Aug 25, 2024

When I run my app with shared_preferences 2.2.3 and 2.3.2.

I get with this code:

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await EasyLocalization.ensureInitialized();
  // ...

The exception:

PlatformException(channel-error, Unable to establish connection on channel: "dev.flutter.pigeon.shared_preferences_android.SharedPreferencesApi.getAll"., null, null)

Here is the related code:

  static Future<void> initEasyLocation() async {
    final preferences = await SharedPreferences.getInstance();

The might be related issue flutter/flutter#153075 mentions:

Given that this is only affecting release Android builds, it feels like an R8 issue. It may be that the analysis is incorrectly determining that the legacy plugin class is unreachable and removing it.

I can sort this out since I use this code here in my build.gradle:

android {
  // ...
  buildTypes {
    debug {
      versionNameSuffix "-Development"
      debuggable true
      minifyEnabled false
      shrinkResources false
// ...

If this package is still maintained I would like to get some help to fix this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant