"Application not installed" by trying to install *.apk at the phone

Hello,



I’m trying to compile and install a HelloWorld-app(basicgame) at my android phone (just like it is described here https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:android).



I successfully built an apk-file and copied it to the phone. But by trying to install it, there was an error message: “application not

installed”.



Does anyone have an idea, why it doesn’t work?



p.s. i’m sorry for my english:(

Do you have your phone set up to install non-market (from unknown sources) applications?



http://pocketnow.com/how-to/how-to-install-non-market-apps-on-your-android-phone

Thank you for the answer. But my phone was already seted up for it:(

Do you use the SDK for deployment an do you do things like they are described in the manual? Can you update the SDK to the version that just came out and try again? It displays the android device log so you can see any error output.

@normen said:
Do you use the SDK for deployment

Yes, the latest version (3.0beta)

@normen said:
an do you do things like they are described in the manual?

yes. i just created new BasicGame(a blue cube) and tryed to transport it to my phone...

@normen said:
Can you update the SDK to the version that just came out and try again? It displays the android device log so you can see any error output.

oh, there are really some updates for android aviable... i'm downloding it now;) "the android device log"... ähm... i can't connect my phone to the pc and run applications with SDK on it:((i mean, without to copy apk to the phone)
@opus31337 said:
ähm... i can't connect my phone to the pc and run applications with SDK on it:((i mean, without to copy apk to the phone)

Öh, warum? ^^ (Why can't you?)
@normen said: Why can't you?

i don't know how:) it doesn't connect automatically and i couldn't do it manual... i didn't also found some information about it there:(

Its described in the manual. Set the project as main project, connect your phone, select “Android Device” next to the play button and make sure “compile on save” is disabled in the project settings. Then when you run your application its run on the device.

i did it just as you said:

[java]Installing C:UsersOPDocumentsjMonkeyProjectsTempAndroidmobilebinMyGame-debug.apk onto default emulator or device…

error: device not found

C:UsersOPDocumentsjMonkeyProjectsTempAndroidnbprojectmobile-impl.xml:6: The following error occurred while executing this line:

D:Program FilesAndroidandroid-sdktoolsantbuild.xml:1124: The following error occurred while executing this line:

D:Program FilesAndroidandroid-sdktoolsantbuild.xml:1138: exec returned: 1

BUILD FAILED (total time: 54 seconds)[/java]



do i have to install some additional software to be able to connect an android phone to the pc(like itunes for iphone) or something like that?

sometimes I’m getting 3 files by building the project: MyGame-release-unsigned.apk, MyGame-debug-unaligned.apk, MyGame-debug. What does it mean?

read the android SDK manual

This should clear up your question on signing and aligning:



http://developer.android.com/guide/developing/building/index.html



and



http://developer.android.com/guide/developing/building/building-cmdline.html



When you build with eclipse it will automatically sign (with debug key, or the real release key if you export the apk), and align for you, so you will not notice it.

@masktuxedo said:
When you build with eclipse it will automatically sign (with debug key, or the real release key if you export the apk), and align for you, so you will not notice it.

This is a feature of the android SDK projects in general, not just under eclipse. Thats why the jmp build process creates the same files.

I thought only eclipse would sign with the debug key automatically (so you might not even know about it when you “run” from eclipse). If you build from the command line for example, I believe you have to create a debug key and include it in your build script.

No, you press “play” in the jME SDK just like in eclipse and the application runs on your phone… or desktop for that matter, different than eclipse :stuck_out_tongue: Thats why he gets the “-debug.apk”, its a normal feature of the android ant build script (which is also used by eclipse). For real (deployment) signing you have to specify a key in eclipse like in any other IDE which also just sets the values in the properties file of the android project. You can even open the mobile folder of the jME SDK projects in eclipse as an android project because of this.

@opus31337 What model phone do you have? Windows requires extra drivers (you can get them from the OEM) for some phones in order to deploy directly to them. This is the case with my HTC Evo.

thank you for the answers;)

@sbook said:
@opus31337 What model phone do you have?

HTC Desire

So did you get this working?


@opus31337 said:
HTC Desire


They should be on your phone's SD card with the HTC Sync software (or are available on HTC's website if you've formatted your SD card). Installing that will get you the driver.

Not sure if this is still an open issue, but I ran into this issue when trying to run it on my Kindle Fire and got around it by installing a debug apk.



The one pointed to from the walk through that didn’t work for me was at:

jmeprojectsHelloWorldTutorialdistMyGame-released-unsigned.apk



I then right clicked the project and did a debug. It created additional ones at the following location, and this one worked for me:

jmeprojectsHelloWorldTutorialmobilebinMyGame-debug.apk

ok well I am not sure exactly how to reproduce the debug apk. It created it before but now I can’t reproduce it. Anyway, if you can figure out how to do that, the debug apk may work. if anyone knows how to do that it would be appreciated.