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

Attempt to invoke virtual method 'java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String)' on a null object reference #96

Closed
eostonystark opened this issue May 18, 2019 · 4 comments

Comments

@eostonystark
Copy link

Flutter crash report; please file at https://github.com/flutter/flutter/issues.

command

flutter run

exception

ProcessException: ProcessException: Process "/private/var/root/Library/Android/sdk/platform-tools/adb" exited abnormally:
Starting: Intent { act=android.intent.action.RUN flg=0x20000000 cmp=one.tokendex.app/.MainActivity (has extras) }

Exception occurred while executing:
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String)' on a null object reference
at android.app.LoadedApk.createAppFactory(LoadedApk.java:224)
at android.app.LoadedApk.(LoadedApk.java:152)
at android.app.ActivityThread.getPackageInfo(ActivityThread.java:2043)
at android.app.ActivityThread.getPackageInfo(ActivityThread.java:1998)
at android.app.ActivityThread.getPackageInfo(ActivityThread.java:1970)
at android.app.ContextImpl.createPackageContextAsUser(ContextImpl.java:2054)
at com.android.server.AttributeCache.get(AttributeCache.java:135)
at com.android.server.am.ActivityRecord.(ActivityRecord.java:903)
at com.android.server.am.ActivityStarter.startActivity(ActivityStarter.java:804)
at com.android.server.am.ActivityStarter.startActivity(ActivityStarter.java:528)
at com.android.server.am.ActivityStarter.startActivityMayWait(ActivityStarter.java:1057)
at com.android.server.am.ActivityStarter.execute(ActivityStarter.java:473)
at com.android.server.am.ActivityManagerService.startActivityAsUser(ActivityManagerService.java:4841)
at com.android.server.am.ActivityManagerShellCommand.runStartActivity(ActivityManagerShellCommand.java:458)
at com.android.server.am.ActivityManagerShellCommand.onCommand(ActivityManagerShellCommand.java:139)
at android.os.ShellCommand.exec(ShellCommand.java:103)
at com.android.server.am.ActivityManagerService.onShellCommand(ActivityManagerService.java:15478)
at android.os.Binder.shellCommand(Binder.java:631)
at android.os.Binder.onTransact(Binder.java:529)
at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:4397)
at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3114)
at android.os.Binder.execTransact(Binder.java:726)
Command: /private/var/root/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell am start -a android.intent.action.RUN -f 0x20000000 --ez enable-background-compilation true --ez enable-dart-profiling true --ez enable-checked-mode true --ez verify-entry-points true one.tokendex.app/one.tokendex.app.MainActivity

#0      runCheckedAsync (package:flutter_tools/src/base/process.dart:255:5)
<asynchronous suspension>
#1      AndroidDevice.startApp (package:flutter_tools/src/android/android_device.dart:450:34)
<asynchronous suspension>
#2      FlutterDevice.runHot (package:flutter_tools/src/resident_runner.dart:364:54)
<asynchronous suspension>
#3      HotRunner.run (package:flutter_tools/src/run_hot.dart:253:39)
<asynchronous suspension>
#4      RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:428:37)
<asynchronous suspension>
#5      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:559:18)
#6      _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:77:64)
#7      _rootRunUnary (dart:async/zone.dart:1132:38)
#8      _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#9      _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
#10     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
#11     Future._propagateToListeners (dart:async/future_impl.dart:668:32)
#12     Future._complete (dart:async/future_impl.dart:473:7)
#13     _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
#14     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:28:18)
#15     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:294:13)
#16     RunCommand.usageValues (package:flutter_tools/src/commands/run.dart)
#17     _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:77:64)
#18     _rootRunUnary (dart:async/zone.dart:1132:38)
#19     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#20     _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
#21     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
#22     Future._propagateToListeners (dart:async/future_impl.dart:668:32)
#23     Future._complete (dart:async/future_impl.dart:473:7)
#24     _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
#25     _AsyncAwaitCompleter.complete.<anonymous closure> (dart:async-patch/async_patch.dart:33:20)
#26     _rootRun (dart:async/zone.dart:1124:13)
#27     _CustomZone.run (dart:async/zone.dart:1021:19)
#28     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:947:23)
#29     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#30     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#31     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:115:13)
#32     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:5)
@pichillilorenzo
Copy link
Owner

I don't see any of my classes in the error log! I think you need to file this issue to the official Flutter repository (https://github.com/flutter/flutter/issues) and not here.

@eostonystark
Copy link
Author

just only add it to pubspec.yaml and get,
restart app, notice as follows
Oops; flutter has exited unexpectedly.
Sending crash report to Google.

@pichillilorenzo
Copy link
Owner

did you try the new version 1.2.0?

This was referenced Jul 6, 2020
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants