Android app wont install using forge run android

Hey Antonie,

I’m trying to run my app via the CLI (windows machine), the build portion seems to work but when I do

forge run android

it appears to run, finds the connected device, saying installing… then says

[ ERROR] Error starting app: Performing Streamed Install
[ ERROR] Try running your app again once the device is available.

  1. The device is open and unlocked
  2. Debug is on and device is trusted ( I have tried to revoke permissions, tick off debug and turn it back on )

To be honest, I have never been able to get the CLI to work properly with Android (oddly the toolkit always worked, but it will no longer open )

Any how any idea what might be happening?

I just tried updating the adb and now I get this error when trying to run

Failure [INSTALL_PARSE_FAILED_NOT_APK: Failed to parse /data/app/vmdl577018969.tmp/base.apk]

Ooof… I haven’t run into this before.

The only thing I can think of is that Windows machines usually need an ADB driver installed for the Android device before you can develop with it.

Do you already have it installed? What device are you using?

Can you see anything else if you run in debug mode with:

forge run android -v

Hi Antoine,

So running that really does not show much more detail… ( the device is on, I have approved the device read from my PC and on the device itself or I guess I should say authorized it )

I’m on a galaxy s10, also I have ADB installed, have tried to do wifi install as well same thing happens. As noted, the toolkit always worked but using the cli it’s now saying this…

File “C:\Users[user]\AppData\Local\Trigger Toolkit\build-tools\forge\”, line 106, in run
result = self._target(*self._args, **self._kwargs)
File “C:\Users[user]\AppData\Local\Trigger Toolkit\build-tools\forge\”, line 483, in run
File “C:\web\apps[app].template\generate_dynamic\”, line 133, in run_app
File “C:\web\apps[app].template\generate_dynamic\”, line 346, in run
self._call_with_params(task_method, task_args)
File “C:\web\apps[app].template\generate_dynamic\”, line 305, in _call_with_params
return method(self, *params)
File “C:\web\apps[app].template\generate_dynamic\”, line 582, in run_android
raise AndroidError(“Try running your app again once the device is available.”)
AndroidError: Try running your app again once the device is available.

So, just to test out if I could sideload the app if I were to deploy as a production apk.

That creates an APK, then I placed the APK on my device and tried to install from the device and got this error message

“There was a problem parsing the package”

(this is the same error message I get in the console when trying to do forge run android)

Tried to downgrade to an old config and get this

[ ERROR] Failed when running java: Exception in thread “main” java.lang.IllegalArgumentException: MALFORMED
at Source)
at Source)
at Source)
at io.trigger.forge.SignedJarBuilder.writeZip(
at io.trigger.forge.ApkSigner.main(

Hey Antonie,

So I did a reboot of my system and updated a few things and it looks like the forge toolset it working now… Very odd…

Anyhow, seems to build now!

1 Like