Android build error

Hello!
I’m working on a 3D human animation in Blender. I imported the human animation to jMonkey with Ogre, and the aplication works fine in the jME sdk, but when I follow the steps to make it an android aplication, I have this error:

Replacing bullet library with android native version.
Expanding: C:\Users\João Marcos\Documents\jME Projects\BasicGame001\mobile\libs\jME3-bullet-natives-android.jar into C:\Users\João Marcos\Documents\jME Projects\BasicGame001\mobile\libs
Deleting: C:\Users\João Marcos\Documents\jME Projects\BasicGame001\mobile\libs\jME3-bullet-natives-android.jar
Deleting directory C:\Users\João Marcos\Documents\jME Projects\BasicGame001\mobile\libs\x86
Copying 1 file to C:\Users\João Marcos\Documents\jME Projects\BasicGame001\mobile\libs
C:\Users\João Marcos\Documents\jME Projects\BasicGame001\nbproject\mobile-impl.xml:21: The following error occurred while executing this line:
java.io.FileNotFoundException: C:\Users\João Marcos\Documents\jME Projects\BasicGame001\mobile\build.xml (The system can not find the specified file)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:138)
at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:278)
at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:178)
at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:82)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:393)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor51.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
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:392)
at org.apache.tools.ant.Target.performTasks(Target.java:413)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:283)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:541)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
FAILURE TO CONSTRUCTION (total time: 2 seconds)

I translated two lines that were in Portuguese (I am from Brazil) to post here, but this is exactly the error.
Can anyone help me?

Having previously run android apps using jmonkey, it was after updating the android-sdk that I began having a similar issue.

C:\Users\LJ\Documents\jMonkeyProjects\3Dmaze\3Dmaze\nbproject\mobile-impl.xml:21: The following error occurred while executing this line:
java.io.FileNotFoundException: C:\Users\LJ\Documents\jMonkeyProjects\3Dmaze\3Dmaze\mobile\build.xml (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:278)
at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:178)
at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:82)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:393)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor52.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
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:392)
at org.apache.tools.ant.Target.performTasks(Target.java:413)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:283)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:541)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)

The build fails when turning android on. If I turn android off, the program builds and runs beautifully.
Everything has been done on windows 7 64bit.
I gather the impression that mobile/build.xml is to be created by android sdk.
If I drop a build.xml file in from previous successful android project builds, it then teels me that the project.properties file could not be found.
I’ve re-installed jme3RC2 and the android sdk, checked the sdk directory path and followed the documentation.
Really stumped on this. Any suggestions would be great.

The default project type for android was changed to gradle, maybe theres some command line option to still generate the ant based format? Else we’ll have to adapt the build scripts to invoke gradle. If you could find out if the android command line tool has such an option, that’d be cool.

Hey @normen,

After looking into the ant command line things for a little while, I pieced together a different solution for myself. I’m not too familiar with those command line ways.

Here is what I did:

Opened eclipse and created a new android application project in the jme projects mobile folder. Doing this with a blank activity, created the android project. Then I placed build.xml and local.projects files from previous projects mobile folders into this projects mobile folder and updated the build file package name. From there I had to modify the mainActivity.java code to match the other projects code (for the framelayout and such). jme will now build and run the android project on my device.

However, I am getting a log full of this:
W/OGLESShaderRenderer(14196): value is not set yet

Just a continual output of that line. With regular log output now and again. This could be an issue with the new project I am working on and not with jme or android I suppose.
Otherwise it looks ok.

Hope this helps.

@mr.ljwilliams said: However, I am getting a log full of this: W/OGLESShaderRenderer(14196): value is not set yet
yep, this is an unrelated issue that has been fixed in the latest version of the engine. It occurs when some of the uniforms of a shader are not set. Sometime you don't need all uniforms to be set so we just removed the warning. Also it wasn't pretty clear, making it pretty useless.
@mr.ljwilliams said: Hey @normen,

After looking into the ant command line things for a little while, I pieced together a different solution for myself. I’m not too familiar with those command line ways.

Here is what I did:

Opened eclipse and created a new android application project in the jme projects mobile folder. Doing this with a blank activity, created the android project. Then I placed build.xml and local.projects files from previous projects mobile folders into this projects mobile folder and updated the build file package name. From there I had to modify the mainActivity.java code to match the other projects code (for the framelayout and such). jme will now build and run the android project on my device.

However, I am getting a log full of this:
W/OGLESShaderRenderer(14196): value is not set yet

Just a continual output of that line. With regular log output now and again. This could be an issue with the new project I am working on and not with jme or android I suppose.
Otherwise it looks ok.

Hope this helps.

Not much but thanks anyway.

So, I checked the latest Android SDK and it works flawlessly with the jME SDK. Maybe you forgot to install some part of the Android SDK? Note theres a new plugin called “Android build tools” since v22 and when you update from v21 you have to run the updater twice to get it. In the end your ADK tool should look like this:

1 Like

@nehon Located the issue within my model. changing the material in the model fixed the “value is not set yet” log.

@normen Thanks for checking it. My SDK Manager looks just like that: SDk Tools 22.0.1, Platform-tools 17, build-tools 17 (can’t attach a screenshot). Everything is up to date. Looks like you are on Mac and I’m on windows 7 (maybe a windows update). Also have eclipse linked into android sdk.
Use tortoise svn and have jme’s subversion plugin deactivated, because there was some sync issues with the mobile dir; turning jme’s subversioning off seemed to correct the syncing problem. Turning subversion back on does not change the error. Including the info just to be thorough.

The way I got it working, I only had to do that for the first build for each project.

At least I have a way to get it building but, it would be nice to have it running proper.

I’ll check on windows but theres not really a reason why the build.xml would be missing there. Must be something in your local setup.

Was figuring that something just wigged out on my machine. Thanks for trying. Take Care

I saw your tutorial on youtube, your case doesn’t even exist in my JME3 IDE.

I see…

Am getting the this error:

“Building debug android application version.
/home/absolutelysaurabh/JMonkeyProjects/BasicGame_2/nbproject/mobile-impl.xml:10: The following error occurred while executing this line:
java.io.FileNotFoundException: /home/absolutelysaurabh/JMonkeyProjects/BasicGame_2/mobile/build.xml (No such file or directory)”

even after following the docs and your tut.

I’ve located sdk path as:
/home/absolutelysaurabh/Android/Sdk

Please help!!

Sorry, I can’t help you.