Android apk installation error: Unknown option: -d

I am duplicating an archived topic from here: https://muut.com/i/openfl/installation:android-apk-installation-er

it seems that the ā€œ-dā€ option on Android is device, not developer tools specific. I apologize for the inconvenience!

There’s an annoying that occurs when you test the same project ID from multiple systems, where the device will reject an install if it is a downgrade, but it does not return an error code, so it goes ahead and runs the old version of your project. Confusing, to say the least, if it’s happened to you.

Now the tools should detect the device version before trying to pass a ā€œ-dā€ argument, we’ll try and get a new version of Lime built and out the door very soon so you don’t have any more problems :slight_smile:

I’ve just pushed a new version of Lime to haxelib which should now resolve this, if you have any further issues, let me know!

Hello,

i’ve just run into this problem…

OpenFL: 6.2.0
Lime: 5.6.0
hxcpp: 3.4.188
hxtools: 1.1.6

Android SDK Tools: 25.2.5
Android SDK Platform-tools: 26.0.1
Android SDK Build-tools: 24.0.1

Is there anyway I can fix this?

Many thanks in advanced for any help!

(Also mentioned here: http://www.openfl.org/archive/community/bugs/openfl-11-android-error-unknown-option-d/ )

It seems to be phone related.

Samsung Galaxy S2 (GT-I9100) Android 4.1.2 Does NOT work.
Samsung Galaxy S4 (GT-I9505) Android 5.0.1 Does work!

Best Regards.

Sorry for the trouble:

Our device SDK version detection script was breaking builds, so it appears to have been disabled. Most devices are new enough to support the ā€˜-d’ (ā€œallow downgradeā€) flag on install, which is super helpful when using the same device on different development systems.

I’ve opened a new issue

Thanks for the reply and the information. I’ve tried and to enable the If statement in:

  • lib\lime\5,6,0\lime\tools\helpers\AndroidHelper.hx

but this does not effect anything? It probably requires to run a command afterwards to rebuild lime.exe or something?

This is ofcourse not a real major issue. I only use older devices to test performance. I can push the Apk to the phone in other ways. But the ability to do it from the haxe command-line utils is slightly faster and does not require me to start the logcat manually :smiley: (me so lazy)

Thanks!

Yeah, you need to lime rebuild tools in order to get that change to work, but I don’t think the code there is reliable :slight_smile:

1 Like

I can’t judge the reliability of this fix on a bigger scale, but on my test devices it solves the problem!

I’m happy with it, Thanks a lot!

Thank you! It’s solved my trouble with freezing on ā€œPerfoming Push installā€¦ā€ after success building.