Install the apk file

I am using galaxy note II for development & I downloaded android sdk. I tried to do a simple deployment test using jmonkey & I set the sdk path in jmonkey. I’m also able to build & the apk file released successfully but when I try to run it onthe device it fails to install.

It fails with what error?

I don’t know . I click on install on the device then it gives 'failed to install ’ that s it

did you enable installing third party applications on your phone?

Good morning folks,
just registered here.
I got the same problem here. When i try to install the released apk it says it can’t and thats it. even with just the basic game.
devices: galaxy nexus and an odys tablet

@nehon said: did you enable installing third party applications on your phone?
Please answer this question, if this option is not enabled, you are only able to install applications from the google play. If you don't know what I'm talking about, google "enabling third party app installation android"

yes, I enabled third party application which are unknown sources, as I know little about Linux. I also enabled the developer mode option which give some cool information. by the way I used the same sdk version with unity3d & it works fine. so I think that it’s just some configuration settings no more & I really don’t know how Jmonkey deal with droid sdk. I attached a screenshot for the result. one more thing I’d like to know is there a dependency app like dependency walker or .net reflector for the apk files?

https://skydrive.live.com/redir?resid=EB2C48FDFA389E6B!1377&authkey=!AD_ty7luYSrILXM

Ok…
What android version/device do you have?

I am using Galaxy Note II & the android version is 4.1.1 (API level 16). my application is just a red a box in the center which is extended from simpleapplication. regarding the sdk I installed API level 16 but it shows from Android SDK manager 4.1.2. from Jmonkey under Mobile I can only select 4.1.2 or 4.2 target. this could be the problem but using the same sdk version by Unity3d the application works fine. so if the problem is the sdk version how can I target 4.1.1.

[java]public static void main(String[] args) {

    //creating new settings for window display
    AppSettings settings = new AppSettings(true);
    settings.setResolution(1024, 576);
    settings.setBitsPerPixel(32);
    
    
    Main app = new Main();
    app.setSettings(settings);
    app.setShowSettings(false);  // remove jmonkey splash screen
    app.start();
}

@Override
public void simpleInitApp() {
    viewPort.setBackgroundColor(new ColorRGBA(0f,0f,0.7f,0.5f));
    Node CentralPivot = new Node("CentralPivot");
    rootNode.attachChild(CentralPivot);
    
    Box box0x0 = new Box( Vector3f.ZERO, 1,1,1);
    Geometry red = new Geometry("Box", box0x0);
    Material mat2 = new Material(assetManager, 
            "Common/MatDefs/Misc/Unshaded.j3md");
    mat2.setColor("Color", ColorRGBA.Red);
    red.setMaterial(mat2);
    red.move(0,0,0);
    
   
    CentralPivot.attachChild(red);
   }[/java]

oh ok yeah it must be it.
Can’t you target prior versions like 4.0?
Target version is the minimum android version your application supports. I even recommend targeting android 2.3 at least since it’s still 45% of the market.

I downloaded version 4.0 for the sdk & I targeted this version but no luck. here is my output window result:

ant -f C:\\Users\\kifcaliph\\Documents\\NetBeansProjects\\leveldesign clean jar init: deps-clean: Updating property file: C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\build\built-clean.properties Deleting directory C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\build clean: Building jar: C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\build\assets.jar init: deps-jar: Updating property file: C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\build\built-jar.properties Created dir: C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\build\classes Created dir: C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\build\empty Compiling 1 source file to C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\build\classes warning: [options] bootstrap class path not set in conjunction with -source 1.5 1 warning compile: Created dir: C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\dist Copying 1 file to C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\build Copy libraries to C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\dist\lib. Building jar: C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\dist\MyGame.jar To run this application from the command line without Ant, try: java -jar "C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\dist\MyGame.jar" Copying application libraries to android project. Deleting directory C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\mobile\libs Created dir: C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\mobile\libs Copying 15 files to C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\mobile\libs Adding libraries for android. Copying 3 files to C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\mobile\libs Replacing bullet library with android native version. Expanding: C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\mobile\libs\jME3-bullet-natives-android.jar into C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\mobile\libs Deleting: C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\mobile\libs\jME3-bullet-natives-android.jar Deleting directory C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\mobile\libs\x86 Copying 1 file to C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\mobile\libs proguard.config is ${proguard.config} Android SDK Tools Revision 21.0.1 Installed at C:\Users\kifcaliph\Desktop\adt-bundle\sdk Project Name: MyGame Project Type: Application Resolving Build Target for MyGame... Project Target: Android 4.0.3 API level: 15 ---------- Creating output directories if needed... ---------- Resolving Dependencies for MyGame... Library dependencies: No Libraries ------------------ API jME3-jogg-a042dbeb582c54d53a48b3260a22ae5a.jar Pre-Dexing C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\mobile\libs\jME3-android.jar -> jME3-android-2be721dd450e2fcf626ac42acbb1ebff.jar Pre-Dexing C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\mobile\libs\jME3-plugins.jar -> jME3-plugins-8ad41ae1b0bdf5b875de48999fcf8ca0.jar Pre-Dexing C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\mobile\libs\nifty-default-controls.jar -> nifty-default-controls-99efcbf7e57683512759757c4a3fd789.jar Pre-Dexing C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\mobile\libs\jME3-niftygui.jar -> jME3-niftygui-e402fbb167969a8b86ed79db85544518.jar Pre-Dexing C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\mobile\libs\jME3-core.jar -> jME3-core-35482ba1c5de0844cb02f13b8d0a7a1b.jar Pre-Dexing C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\mobile\libs\MyGame.jar -> MyGame-0a34ff92159e8dc77485eb484270970c.jar Using Pre-Dexed annotations-b5ad05f2f4061d617692ede2b43eb5e3.jar j-ogg-vorbisd-65e5b63f8f42772a39f6b4f9fa36b153.jar Pre-Dexing C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\mobile\libs\nifty-style-black.jar -> nifty-style-black-82a18f8b7953e226b83c3b0535f21132.jar Pre-Dexing C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\mobile\libs\j-ogg-oggd.jar -> j-ogg-oggd-831dc732c1e11ac79fd5940130c45587.jar Pre-Dexing C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\mobile\libs\eventbus.jar -> eventbus-44a62db4902bf2a9559173d820f229d3.jar Pre-Dexing C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\mobile\libs\assets.jar -> assets-5d129749e7ddee2c7783b24099de5f49.jar Pre-Dexing C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\mobile\libs\jME3-bullet.jar -> jME3-bullet-2e63f53f45d51e4789c7e73ca08726b0.jar Pre-Dexing C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\mobile\libs\jME3-terrain.jar -> jME3-terrain-5e1144982d19ab371682dbc979baacfd.jar Pre-Dexing C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\mobile\libs\jME3-effects.jar -> jME3-effects-41b35d4711c2b10dae56befc95ef838d.jar Pre-Dexing C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\mobile\libs\xmlpull-xpp3.jar -> xmlpull-xpp3-6014419c024d9b604f27767f4faedd7c.jar warning: Ignoring InnerClasses attribute for an anonymous inner class (org.xmlpull.v1.builder.impl.XmlDocumentImpl$1) that doesn't come with an associated EnclosingMethod attribute. This class was probably produced by a compiler that did not target the modern .class file format. The recommended solution is to recompile the class from source, using an up-to-date compiler and without specifying any "-target" type options. The consequence of ignoring this warning is that reflective operations on this class will incorrectly indicate that it is *not* an inner class. warning: Ignoring InnerClasses attribute for an anonymous inner class (org.xmlpull.v1.builder.impl.XmlElementImpl$1) that doesn't come with an associated EnclosingMethod attribute. This class was probably produced by a compiler that did not target the modern .class file format. The recommended solution is to recompile the class from source, using an up-to-date compiler and without specifying any "-target" type options. The consequence of ignoring this warning is that reflective operations on this class will incorrectly indicate that it is *not* an inner class. warning: Ignoring InnerClasses attribute for an anonymous inner class (org.xmlpull.v1.builder.impl.XmlElementImpl$2) that doesn't come with an associated EnclosingMethod attribute. This class was probably produced by a compiler that did not target the modern .class file format. The recommended solution is to recompile the class from source, using an up-to-date compiler and without specifying any "-target" type options. The consequence of ignoring this warning is that reflective operations on this class will incorrectly indicate that it is *not* an inner class. warning: Ignoring InnerClasses attribute for an anonymous inner class (org.xmlpull.v1.builder.impl.XmlElementImpl$3) that doesn't come with an associated EnclosingMethod attribute. This class was probably produced by a compiler that did not target the modern .class file format. The recommended solution is to recompile the class from source, using an up-to-date compiler and without specifying any "-target" type options. The consequence of ignoring this warning is that reflective operations on this class will incorrectly indicate that it is *not* an inner class. Pre-Dexing C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\mobile\libs\jME3-networking.jar -> jME3-networking-7552a13f2cac5ae8f3f0c07d0c751434.jar Pre-Dexing C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\mobile\libs\nifty.jar -> nifty-4cc8d0d92af616662f684b46ad2b9518.jar Found Deleted Target File Converting compiled files and external libraries into C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\mobile\bin\classes.dex... Merged dex A (7 defs/2.3KiB) with dex B (5 defs/11.4KiB). Result is 12 defs/15.3KiB. Took 0.1s Merged dex A (12 defs/15.3KiB) with dex B (51 defs/124.3KiB). Result is 63 defs/163.8KiB. Took 0.1s Merged dex A (63 defs/163.8KiB) with dex B (18 defs/97.7KiB). Result is 81 defs/323.7KiB. Took 0.1s Merged dex A (81 defs/323.7KiB) with dex B (189 defs/185.0KiB). Result is 270 defs/654.1KiB. Took 0.1s Merged dex A (270 defs/654.1KiB) with dex B (13 defs/26.9KiB). Result is 283 defs/938.6KiB. Took 0.1s Result compacted from 2739.1KiB to 1429.1KiB to save 1310.1KiB Merged dex A (283 defs/938.6KiB) with dex B (561 defs/1054.1KiB). Result is 844 defs/1429.1KiB. Took 0.4s Merged dex A (844 defs/1429.1KiB) with dex B (1 defs/2.4KiB). Result is 845 defs/1807.9KiB. Took 0.1s Merged dex A (845 defs/1807.9KiB) with dex B (2 defs/1.1KiB). Result is 847 defs/2418.8KiB. Took 0.2s Result compacted from 3517.1KiB to 1471.6KiB to save 2045.6KiB Merged dex A (847 defs/2418.8KiB) with dex B (23 defs/46.1KiB). Result is 870 defs/1471.6KiB. Took 0.3s Merged dex A (870 defs/1471.6KiB) with dex B (16 defs/25.6KiB). Result is 886 defs/1890.0KiB. Took 0.1s Result compacted from 2631.1KiB to 1573.8KiB to save 1057.3KiB Merged dex A (886 defs/1890.0KiB) with dex B (63 defs/87.8KiB). Result is 949 defs/1573.8KiB. Took 0.3s Merged dex A (949 defs/1573.8KiB) with dex B (64 defs/139.7KiB). Result is 1013 defs/2156.1KiB. Took 0.2s Result compacted from 3067.9KiB to 1843.6KiB to save 1224.3KiB Merged dex A (1013 defs/2156.1KiB) with dex B (85 defs/161.0KiB). Result is 1098 defs/1843.6KiB. Took 0.4s Merged dex A (1098 defs/1843.6KiB) with dex B (24 defs/59.6KiB). Result is 1122 defs/2399.1KiB. Took 0.2s Result compacted from 3380.0KiB to 2036.4KiB to save 1343.6KiB Merged dex A (1122 defs/2399.1KiB) with dex B (55 defs/147.5KiB). Result is 1177 defs/2036.4KiB. Took 0.4s Merged dex A (1177 defs/2036.4KiB) with dex B (102 defs/104.5KiB). Result is 1279 defs/2700.1KiB. Took 0.2s Result compacted from 4106.8KiB to 2516.0KiB to save 1590.8KiB Merged dex A (1279 defs/2700.1KiB) with dex B (368 defs/409.2KiB). Result is 1647 defs/2516.0KiB. Took 0.5s Crunching PNG Files in source dir: C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\mobile\res To destination dir: C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\mobile\bin\res Crunched 0 PNG files to update cache Found Deleted Target File Creating full resource package... Found Deleted Target File Creating MyGame-release-unsigned.apk for release... No key.store and key.alias properties found in build.properties. Please sign C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\mobile\bin\MyGame-release-unsigned.apk manually and run zipalign from the Android SDK tools. Updating property file: C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\mobile\bin\build.prop Updating property file: C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\mobile\bin\build.prop Updating property file: C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\mobile\bin\build.prop Updating property file: C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\mobile\bin\build.prop MyGame.release: Copying 1 file to C:\Users\kifcaliph\Documents\NetBeansProjects\leveldesign\dist jar: BUILD SUCCESSFUL (total time: 1 minute 11 seconds)

I build the project for 2.2 target & it still fails

Why don’t you directly run the app on the device from the SDK so you see the actual error output?
The content of this post is meant to be read as a straight information or question without an implicit dismissive stance or interest in having the other party feel offended unless theres emotes that hint otherwise or there’s an increased use of exclamation marks and all-capital words.

yeah, but I really don’t know how to connect my device

If you’re on windows you probably have to install some driver and then go to the devices settings and enable “developer mode”. On OSX I only had to enable “developer mode” on my galaxy tab to make it work.
The content of this post is meant to be read as a straight information or question without an implicit dismissive stance or interest in having the other party feel offended unless theres emotes that hint otherwise or there’s an increased use of exclamation marks and all-capital words.

well, I downloaded Samsung drivers & I am able to install & run the application on the device. that’s really cool thanks for the help. But I still wonder why the apk file doesn’t run. I mean do I have to do an additional step like signing or something like that. also how can I share my test builds among different devices.

I’d like to mention that Jmonkey Demo apk is really impressive.