Previewing or exporting Android build is always failing

Previewing or exporting Android build is always failing with following stack trace. I tried running “Pull To Reload” example.

Fuse 1.0.2 (build 13664)
Configuring (2.8 s)
Compiling syntax tree (2.0 s)
Generating code and data (8.5 s)
Building Android app
2/2: PullToReload.apk
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
(46.1 s)

Build completed in 59.45 seconds
Installing APK on 1 device(s)
Exception occurred while executing:
java.lang.IllegalArgumentException: Unknown package: com.apps.pulltoreload
	at com.android.server.pm.Settings.isOrphaned(Settings.java:4400)
	at com.android.server.pm.PackageManagerService.isOrphaned(PackageManagerService.java:20603)
	at com.android.server.pm.PackageManagerService.deletePackageVersioned(PackageManagerService.java:17759)
	at com.android.server.pm.PackageInstallerService.uninstall(PackageInstallerService.java:896)
	at com.android.server.pm.PackageManagerShellCommand.runUninstall(PackageManagerShellCommand.java:912)
	at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:134)
	at android.os.ShellCommand.exec(ShellCommand.java:96)
	at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:20893)
	at android.os.Binder.shellCommand(Binder.java:573)
	at android.os.Binder.onTransact(Binder.java:473)
	at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:2638)
	at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:3466)
	at android.os.Binder.execTransact(Binder.java:674)

ERROR: Process has exited, so the requested information is not available.
fuse: Android run failed

Where as I can see the package is created in Android preview folder.
![file](https://s3.us-east-2.amazonaws.com/fuse-legacy-forum-assets/pGEDX4mZZNQR-image-1498620435351.25.44 PM.png)

This came up after cmake fix 1.0.2 was released.
OS: Mac Sierra 10.12.3

Hi,

did you run the preview from Fuse menu, or did you use a shell command? If it’s the latter, what was the command?

And what is the device that you tried running this on? Does it have developer mode enabled?

Hi Uldis,

I used preview from Fuse Menu. I had emulator running and assumed it will run on an emulator that is Nexus 5x API 26. Developer options are ON on Emulator. Didn’t get chance to connect to device and run. Also gives above error when I try to Export for Android.

Oh, I see. We don’t officially support running on emulators, but we know people have had some success doing that. So in this case unfortunately you’re on your own to figure how to run on the emulator.

You’re very welcome to post again if the same (or different) issue persists when running on a physical device though.

That said, exporting for Android should still work perfectly fine. Could you please run fuse build -tandroid -v in Terminal, in project root folder, and then paste the log you get?