[SOLVED] Android deployment problems

I’m having a lot of problems trying to deploy to android. I have the newest android sdk tools, and I’ve upgraded jmonkeyengine to the newest beta version and I still get this error:

E:\Projects\mygame\nbproject\mobile-impl.xml:21: The following error occurred while executing this line:
java.io.FileNotFoundException: E:\Projects\mygame\mobile\build.xml (The system cannot find the file specified)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.(FileInputStream.java:138)
at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:250)
at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:178)
at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:93)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:392)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
at sun.reflect.GeneratedMethodAccessor60.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:286)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:555)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
BUILD FAILED (total time: 0 seconds)

When I enable android deployment it adds the mobile folder but there is nothing in it. I’ve also got the android plugin for the sdk.
I’ve tried copying over the build.xml from nbproject to mobile but it still fails to build, but I didn’t think that would work. Can anyone help? Has anyone had this issue? I’m on windows 10 by the way. Thank you!

1 Like

I Think you might miss the Android sdk whose path you set in the project properties.
Unfortunately Android and Netbeans is a Problem especially since the new sdkmanager broke Everything so my Suggestion for less headache is opening the game project in Android Studio to compile it

2 Likes

Thanks, I have the android sdk path set. Is there a tutorial for migrating a jme3 project to Android Studio? Or a particular way to do it? I’ve opened it in the Studio but I’m not sure what to do, can’t even compile it. Guess I need to learn how to use it

1 Like

This might be helpful to you.

Good luck.

2 Likes

Thank you that looks very helpful. Will I have to get rid of the jme3 launch screen? It’s quite late here atm and I am a big noob, but I’ll give it my all tomorrow haha

1 Like

No that Launch screen is part of the Desktop Code, you only need to ensure that you have jme3-android but not jme3-desktop in your apk as libraries which should be done by gradle

2 Likes

Thanks! I found this GitHub - aegroto/JMEAndroidTemplate: Android JMonkey Engine project template using Gradle and I managed to get my code running just replacing the main method of that and adding the missing gradle dependencies :smiley: but now none of my materials are loaded. Any clues?

Edit: Nevermind! Seems that was only on the Android Virtual Machine? Everything works fine when I’m running it through debug to my phone. This is fantastic :smiley:

3 Likes