Flutter android facing an issue on Dev Channel : No virtual method getLongVersionCode()J in class Landroid/content/pm/PackageInfo;

Android (any version) is facing an issue while launch app. This issue raised because of last Dev Upgrade becuase it was working properly on previous version. Please have a look and solve it asap.

Flutter 1.27.0-8.0.pre • channel dev • https://github.com/flutter/flutter.git
Framework • revision b7d4806243 (7 days ago) • 2021-02-19 09:22:45 -0800
Engine • revision 6993cb229b
Tools • Dart 2.13.0 (build 2.13.0-30.0.dev)

Runtime Exception is as shown below.

[+1629 ms] E/AndroidRuntime(21227): FATAL EXCEPTION: main
[   +1 ms] E/AndroidRuntime(21227): Process: com.example.unoplayer, PID: 21227
[        ] E/AndroidRuntime(21227): java.lang.NoSuchMethodError: No virtual method getLongVersionCode()J in class Landroid/content/pm/PackageInfo; or its super classes (declaration of 'android.content.pm.PackageInfo' appears in /system/framework/framework.jar) 
[   +1 ms] E/AndroidRuntime(21227):     at io.flutter.plugin.editing.TextInputPlugin.isRestartAlwaysRequired(TextInputPlugin.java:512)
[   +1 ms] E/AndroidRuntime(21227):     at io.flutter.plugin.editing.TextInputPlugin.<init>(TextInputPlugin.java:165)
[   +2 ms] E/AndroidRuntime(21227):     at io.flutter.embedding.android.FlutterView.attachToFlutterEngine(FlutterView.java:895)
[        ] E/AndroidRuntime(21227):     at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onCreateView(FlutterActivityAndFragmentDelegate.java:304)
[   +1 ms] E/AndroidRuntime(21227):     at io.flutter.embedding.android.FlutterActivity.createFlutterView(FlutterActivity.java:518)
[        ] E/AndroidRuntime(21227):     at io.flutter.embedding.android.FlutterActivity.onCreate(FlutterActivity.java:415)
[        ] E/AndroidRuntime(21227):     at android.app.Activity.performCreate(Activity.java:7258)
[        ] E/AndroidRuntime(21227):     at android.app.Activity.performCreate(Activity.java:7249)
[        ] E/AndroidRuntime(21227):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1222)
[        ] E/AndroidRuntime(21227):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2927)
[        ] E/AndroidRuntime(21227):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3059)
[        ] E/AndroidRuntime(21227):     at android.app.ActivityThread.-wrap11(Unknown Source:0)
[        ] E/AndroidRuntime(21227):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1724)
[        ] E/AndroidRuntime(21227):     at android.os.Handler.dispatchMessage(Handler.java:106)
[        ] E/AndroidRuntime(21227):     at android.os.Looper.loop(Looper.java:164)
[        ] E/AndroidRuntime(21227):     at android.app.ActivityThread.main(ActivityThread.java:7000)
[        ] E/AndroidRuntime(21227):     at java.lang.reflect.Method.invoke(Native Method)
[        ] E/AndroidRuntime(21227):     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
[        ] E/AndroidRuntime(21227):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)

1 possible answer(s) on “Flutter android facing an issue on Dev Channel : No virtual method getLongVersionCode()J in class Landroid/content/pm/PackageInfo;

  1. I’m getting the same issue
    java.lang.NoSuchMethodError: No virtual method getLongVersionCode()J in class Landroid/content/pm/PackageInfo; or its super classes (declaration of ‘android.content.pm.PackageInfo’ appears in /system/framework/framework.jar)