(urgent) Question regarding to Android application

I built my game first, then I converted it into adroid application by one-key deployment provided by JME3 wiki.



But the only thing appeared in my phone’s screen is a blue cube…



I tried to build some other simple applications and converted them into android. But there is still a blue cube in my phone’s screen.



Could anybody tell me how to deal with this issue? Thanks very much!!!

It sounds like you are sending the wrong application (one of the early tutorials) to the android not the one you think you are…

@zarch said:
It sounds like you are sending the wrong application (one of the early tutorials) to the android not the one you think you are...

package com.mycompany.mygame;

import com.jme3.app.AndroidHarness;
import android.content.pm.ActivityInfo;
import com.jme3.system.android.AndroidConfigChooser.ConfigType;

public class MainActivity extends AndroidHarness{

/*
* Note that you can ignore the errors displayed in this file,
* the android project will build regardless.
* Install the 'Android' plugin under Tools->Plugins->Available Plugins
* to get error checks and code completion for the Android project files.
*/

public MainActivity(){
// Set the application class to run
appClass = "jme3test.helloworld.HelloJME3";
// Try ConfigType.FASTEST; or ConfigType.LEGACY if you have problems
eglConfigType = ConfigType.BEST;
// Exit Dialog title & message
exitDialogTitle = "Exit?";
exitDialogMessage = "Press Yes";
// Enable verbose logging
eglConfigVerboseLogging = false;
// Choose screen orientation
screenOrientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
// Invert the MouseEvents X (default = true)
mouseEventsInvertX = true;
// Invert the MouseEvents Y (default = true)
mouseEventsInvertY = true;
}

}


After I deployed android, this is my main activity file.

I set the new application as main project.

I guess I run the right application. It's really frustrating T.T
@zarch said:
It sounds like you are sending the wrong application (one of the early tutorials) to the android not the one you think you are...


In order to run my game,What need I do after convert the original java application into android version (use one key deployment)?

Thank you!

I just select the right project, select the right device, hit debug.



I’ve not used the android stuff much though so if you’ve checked the basics you will need to wait for someone else to take a look…

Thanks!



I chose the my application as my main project.



Then I chose the my main class as the main class of the game.



But whatever I run , the only thing I could see in my phone’s screen is that poor. stupid blue cube T.T

So set the correct main class in your project.

@normen said:
So set the correct main class in your project.

package com.mycompany.mygame;

import com.jme3.app.AndroidHarness;
import android.content.pm.ActivityInfo;
import com.jme3.system.android.AndroidConfigChooser.ConfigType;

public class MainActivity extends AndroidHarness{

/*
* Note that you can ignore the errors displayed in this file,
* the android project will build regardless.
* Install the 'Android' plugin under Tools->Plugins->Available Plugins
* to get error checks and code completion for the Android project files.
*/

public MainActivity(){
// Set the application class to run
appClass = "RaceClient";
// Try ConfigType.FASTEST; or ConfigType.LEGACY if you have problems
eglConfigType = ConfigType.BEST;
// Exit Dialog title & message
exitDialogTitle = "Exit?";
exitDialogMessage = "Press Yes";
// Enable verbose logging
eglConfigVerboseLogging = false;
// Choose screen orientation
screenOrientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
// Invert the MouseEvents X (default = true)
mouseEventsInvertX = true;
// Invert the MouseEvents Y (default = true)
mouseEventsInvertY = true;
}

}


Yes, this is my main activityfile, The RaceClient is my main class.
So I think I chose the right class to convert into main activity....
In order to run correctly, after deployment, need I do any thing related to android?
Thanks!

You need to build the main application, try clean&build.

@normen said:
You need to build the main application, try clean&build.

Thanks ! now it works.

My application is a online game which need to connect to the server first

I use the udp to transmit the my racecar's status and use tcp to register ID in the sever.

And it works well in the desktop version application

If i convert it to the android version by one- key deployment.

in order to make my android client work well, What need I do for the network connection?

Thanks !
@tigerliu said:
in order to make my android client work well, What need I do for the network connection?

Write a client-server system..
@normen said:
Write a client-server system..

I already write a desktop version fro server and client and they work well

Now I convert the client into the android version by on key deployment.

But it could't connect to the server since I converted it

Theres some directive you have to add to the android manifest, :google: is your friend :wink:

@normen said:
Theres some directive you have to add to the android manifest, :google: is your friend ;)

Thanks!
@normen said:
Theres some directive you have to add to the android manifest, :google: is your friend ;)

I'm a beginner of android and JME3's developer. i don't really understand how to use JME3 to develop android application.
Now I guess I understand better, Thanks for your help ,~have a good day ^^
@normen said:
Theres some directive you have to add to the android manifest, :google: is your friend ;)

Sorry for bothering you again...

sceneModel = assetManager.loadModel("./town/main.scene");
sceneModel.setLocalScale(2f);

The town works well in desktop application version.

But if I convert my application into android version.

It could't load the town and erro occured.

Do you know why? I searched google , they said terrain could't work with android .But the town is not terrain, right?

Thank you!!

The error you get probably describes whats the problem…

But it could load the town if i do not concert the application into the android version.



the thing is that once you convert it, this error may occur…

@normen said:
The error you get probably describes whats the problem..

com.jme3.asset.AssetNotFoundException:town/main.scene.

I imported library . So it could work well in Desktop application.

But why it could not be loaded in android...

T.T

There is no library with that file, what you say cannot be. If you copied it to your assets folder, convert it to j3o. Generally read the manual.