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

App Installed but not started (android) #22852

Closed
imadarif opened this issue Jan 3, 2019 · 4 comments
Closed

App Installed but not started (android) #22852

imadarif opened this issue Jan 3, 2019 · 4 comments
Labels
Bug Platform: Android Android applications. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@imadarif
Copy link

imadarif commented Jan 3, 2019

React Native Environment Info:
System:
OS: macOS High Sierra 10.13.6
CPU: (4) x64 Intel(R) Core(TM) i5-4570R CPU @ 2.70GHz
Memory: 210.50 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 8.9.4 - /usr/local/bin/node
Yarn: yarn install v0.27.5
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
Done in 382.22s. - /usr/local/bin/yarn
npm: 6.5.0 - /usr/local/bin/npm
SDKs:
iOS SDK:
Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
Android SDK:
API Levels: 27
Build Tools: 27.0.3
IDEs:
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
react: 16.6.1 => 16.6.1
react-native: 0.57.5 => 0.57.5
npmGlobalPackages:
react-native-cli: 2.0.1

app is installed in android emulator but not started.

$ adb -s emulator-5554 shell am start -n com.application.xxx/com.application.xxx.MainActivity
Starting: Intent { cmp=com.application.xxx/.MainActivity }

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)

@iba-1
Copy link

iba-1 commented Mar 18, 2019

Same thing here:
BUILD SUCCESSFUL in 8s
47 actionable tasks: 12 executed, 35 up-to-date
info Running adb -s emulator-5554 reverse tcp:8081 tcp:8081
info Starting the app on emulator-5554 (adb -s emulator-5554 shell am start -n com.trumpingtruck/com.trumpingtruck.MainActivity)...
Starting: Intent { cmp=com.trumpingtruck/.MainActivity }

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)

@olanMbakop
Copy link

I got same issue. Successfully build and installed, but not able to run on emulator.

@stale
Copy link

stale bot commented Aug 2, 2019

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Aug 2, 2019
@stale
Copy link

stale bot commented Aug 9, 2019

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Aug 9, 2019
@facebook facebook locked as resolved and limited conversation to collaborators Aug 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Platform: Android Android applications. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

5 participants