Androidharness not working

@ben255
Can you tell me if u get pixeled results with Terrain + alphamaps too?

Kind regards
Alex

well i have a windows installation on a drive tried out the usb way. but my phone is old and something is broken cuz i cant get the connection to the computer to work. it connects and then it looses the device, it still loads the battery fine. so my only option is emulator.

Can you tell me if u get pixeled results with Terrain + alphamaps too?
no idea what this is.

Nah this sounds like a setup problem.
Try this:

  1. Get sure Your Phone is in develop Mode
    You must have the develop Button in settings.

  2. If its Not that, and iam quite sure it isnt, Check that Your Phone connects via msp protocoll.

  3. If you have checked 1. And 2. then its a USB problem.
    For this u have to uninstall USB settings, there is a tool for this knowen issue.

It should work now. Mobile Typ, model you have?

How to enable developer mode: Read 1.“First paragraph”
http://droidlessons.com/how-to-root-the-moto-g/

Sry its called MTP(MediaTransferProtocol)
It is diffrent to activate for each device so check google.
example:
sriraj.org

The tool I use for broken usb’s is AsusRootKit but it its the same as deview.
AsusRootKit: http://www.wugfresh.com/nrt/
Deview: http://www.chip.de/downloads/USBDeview-32-Bit_25521735.html

Unplug your device and Launch USBDeview

  • Use USBDeview to uninstall any;

    • Android ADB Interface device’s,
    • Samsung USB devices,
    • Google USB drivers
    • … or ANYTHING else you see that resembles your Nexus, or sony or what ever
  • In particular look for devices with Vendor ID

    • “18d1” or… “04e8”
  • Simply right click these devices, and select the option to:

    • “Uninstall Selected Devices”

Windows will now reinstall your device drivers :wink:
if it still dont work, use universal usb drivers from the AsusRootKit above

this is a fresh windows install. its a motorola razor. ive never had issues before, i think its a usb issue and i probly have to buy a new usb. i almost didnt even get the driver to install from the phone, took a while for the phone to even connect, and it still does for a moment then the driver is lost. and yes i got dev setting on it, i will probly have to go the long route. sending over a apk to test with when the time is right, before that i can test on the avd but still lost as to why it doesnt work.
im looking though the source packages in the JME and cant find once where the androidharness has been used for the android device. its all public static void main… it even doesnt have the androidharness imported when i tried to write my own android rutin to try it out.
why cant you just use the damn jars, the example code just makes it even more confusing

  1. Download jme sdk

  2. Install it

  3. Open it

  4. Open preferences

  5. Click android

  6. Activate it

  7. New project

  8. New jme game (Not android)

  9. Copy example game in there

  10. Test with Desktop config this schould work

10.1 Switch to android config this should work

if it works:
11. Open eclipse
12. Copy activity example
13. Copy game exaple
14. Set Name in Manifest of copied activity
15. Build apk
16. Copy apk to device with bluetooth Or dropbox Or whatever
17. Imstall it
18 Start it

Questions?

I wrote u before this is normal if there is a Software issue with the device.
But if u dont wana try, leave it.

yah, thanks for the help. i will figure it out eventully. or i will just go back to normal opengles programming

https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:eclipse_jme3_android_jnindk in this tutorial. is the base project(JMEclipse-base) rly needed. cant it be created from inside the android project?

Sry i dont understand your question.
Can it be created? it=?

Do you work with jme3sdk, or jme3sdk+eclipse?
Does your project run with desktop build?
Does same project (no code changed, only change deploy from desktop to android) run on droid build?

Maybe i create a video this evening if i get back early.

Spam post to get the server time.
Its 00:08 server time utc and 02:08 on my clock.
Wont get back before 20:00 UTC if you need a video.

‘it’ as in the simpleapplication code. i tried the sdk but i dont like to be without the android part of progamming, and the plugin just wont install for some reason.

still now eclipse is giving me
[java]
[2014-09-24 01:02:14 - Dex Loader] Unable to execute dex: Cannot merge new index 66217 into a non-jumbo instruction!
[2014-09-24 01:02:14 - jmonkey] Conversion to Dalvik format failed: Unable to execute dex: Cannot merge new index 66217 into a non-jumbo instruction![/java]
only solution i have found to the problem is ‘dex.force.jumbo=true’ but didnt help anyway still popping up.

nvm Solved. did a clean of the project and worked.

this is the next error. how do you accully use the damn androidharness and adding a simpleapplication to that harness?
[java]
09-23 19:32:49.275: E/AndroidRuntime(1207): FATAL EXCEPTION: main
09-23 19:32:49.275: E/AndroidRuntime(1207): Process: com.example.jmonkey, PID: 1207
09-23 19:32:49.275: E/AndroidRuntime(1207): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.jmonkey/com.example.jmonkey.GameActivity}: java.lang.NullPointerException
09-23 19:32:49.275: E/AndroidRuntime(1207): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
09-23 19:32:49.275: E/AndroidRuntime(1207): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
09-23 19:32:49.275: E/AndroidRuntime(1207): at android.app.ActivityThread.access$800(ActivityThread.java:135)
09-23 19:32:49.275: E/AndroidRuntime(1207): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
09-23 19:32:49.275: E/AndroidRuntime(1207): at android.os.Handler.dispatchMessage(Handler.java:102)
09-23 19:32:49.275: E/AndroidRuntime(1207): at android.os.Looper.loop(Looper.java:136)
09-23 19:32:49.275: E/AndroidRuntime(1207): at android.app.ActivityThread.main(ActivityThread.java:5017)
09-23 19:32:49.275: E/AndroidRuntime(1207): at java.lang.reflect.Method.invokeNative(Native Method)
09-23 19:32:49.275: E/AndroidRuntime(1207): at java.lang.reflect.Method.invoke(Method.java:515)
09-23 19:32:49.275: E/AndroidRuntime(1207): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
09-23 19:32:49.275: E/AndroidRuntime(1207): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
09-23 19:32:49.275: E/AndroidRuntime(1207): at dalvik.system.NativeStart.main(Native Method)
09-23 19:32:49.275: E/AndroidRuntime(1207): Caused by: java.lang.NullPointerException
09-23 19:32:49.275: E/AndroidRuntime(1207): at com.jme3.app.AndroidHarness.onCreate(AndroidHarness.java:235)
09-23 19:32:49.275: E/AndroidRuntime(1207): at com.example.jmonkey.GameActivity.onCreate(GameActivity.java:16)
09-23 19:32:49.275: E/AndroidRuntime(1207): at android.app.Activity.performCreate(Activity.java:5231)
09-23 19:32:49.275: E/AndroidRuntime(1207): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
09-23 19:32:49.275: E/AndroidRuntime(1207): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
09-23 19:32:49.275: E/AndroidRuntime(1207): … 11 more

[/java]

If my posts help you, rate them :wink:

Dexloader = you have same libary twice referenced.

Check: Build -> libraries -> remove double entrys.
I had a folder (private libraries) Auto generated.

  1. Create activity, extend androidharness
    For this check the activity example link I gave you before.

  2. Create game class extends simpleapplication
    For this check the game example link I gave you before.

  3. Set the Name of your game class extends simpleapplication in the activity class.
    For this check the activity example link I gave you before.

It should run now

1 Like

[java]
public class GameActivity extends AndroidHarness {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
public GameActivity () {
appClass = com.example.jmonkey.Game.class.getName();
// Try ConfigType.FASTEST; or ConfigType.LEGACY if you have problems
eglConfigType = ConfigType.BEST;

	// Exit Dialog title & message
	exitDialogTitle = "Quit game?";
	exitDialogMessage = "Do you really want to quit the game?";
 
	// Choose screen orientation
	//screenOrientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
 
	// Invert the MouseEvents X (default = true)
	mouseEventsInvertX = true;
 
	// Invert the MouseEvents Y (default = true)
	mouseEventsInvertY = true;
}

}
[/java]
[java]
public class Game extends SimpleApplication{
@Override
public void simpleInitApp() {
}
}
[/java]
[java]
<manifest xmlns:android=“http://schemas.android.com/apk/res/android
package=“com.example.jmonkey”
android:versionCode=“1”
android:versionName=“1.0” >

&lt;uses-feature android:glEsVersion="0x00020000" android:required="true" /&gt;
&lt;uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="20" /&gt;

&lt;application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" &gt;
    &lt;activity
        android:name=".MainActivity"
        android:label="@string/app_name" &gt;
        &lt;intent-filter&gt;
            &lt;action android:name="android.intent.action.MAIN" /&gt;

            &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
        &lt;/intent-filter&gt;
    &lt;/activity&gt;
    &lt;activity
        android:name=".GameActivity"
        android:label="@string/title_activity_game" &gt;
    &lt;/activity&gt;
&lt;/application&gt;

</manifest>
[/java]

[java]
09-23 21:59:58.695: E/AndroidRuntime(1511): FATAL EXCEPTION: main
09-23 21:59:58.695: E/AndroidRuntime(1511): Process: com.example.jmonkey, PID: 1511
09-23 21:59:58.695: E/AndroidRuntime(1511): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.jmonkey/com.example.jmonkey.GameActivity}: java.lang.UnsupportedOperationException: OpenGL ES 2.0 is not supported on this device
09-23 21:59:58.695: E/AndroidRuntime(1511): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
09-23 21:59:58.695: E/AndroidRuntime(1511): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
09-23 21:59:58.695: E/AndroidRuntime(1511): at android.app.ActivityThread.access$800(ActivityThread.java:135)
09-23 21:59:58.695: E/AndroidRuntime(1511): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
09-23 21:59:58.695: E/AndroidRuntime(1511): at android.os.Handler.dispatchMessage(Handler.java:102)
09-23 21:59:58.695: E/AndroidRuntime(1511): at android.os.Looper.loop(Looper.java:136)
09-23 21:59:58.695: E/AndroidRuntime(1511): at android.app.ActivityThread.main(ActivityThread.java:5017)
09-23 21:59:58.695: E/AndroidRuntime(1511): at java.lang.reflect.Method.invokeNative(Native Method)
09-23 21:59:58.695: E/AndroidRuntime(1511): at java.lang.reflect.Method.invoke(Method.java:515)
09-23 21:59:58.695: E/AndroidRuntime(1511): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
09-23 21:59:58.695: E/AndroidRuntime(1511): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
09-23 21:59:58.695: E/AndroidRuntime(1511): at dalvik.system.NativeStart.main(Native Method)
09-23 21:59:58.695: E/AndroidRuntime(1511): Caused by: java.lang.UnsupportedOperationException: OpenGL ES 2.0 is not supported on this device
09-23 21:59:58.695: E/AndroidRuntime(1511): at com.jme3.system.android.OGLESContext.createView(OGLESContext.java:146)
09-23 21:59:58.695: E/AndroidRuntime(1511): at com.jme3.app.AndroidHarness.onCreate(AndroidHarness.java:236)
09-23 21:59:58.695: E/AndroidRuntime(1511): at com.example.jmonkey.GameActivity.onCreate(GameActivity.java:15)
09-23 21:59:58.695: E/AndroidRuntime(1511): at android.app.Activity.performCreate(Activity.java:5231)
09-23 21:59:58.695: E/AndroidRuntime(1511): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
09-23 21:59:58.695: E/AndroidRuntime(1511): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
09-23 21:59:58.695: E/AndroidRuntime(1511): … 11 more
[/java]

what jar imports are necessary for android usage. is it only the jme3-core and jme3-android? i tried with the desktop and that gives me swing noclassdeff found error for obvious reasons but still.
And my avd uses Host GPU for opengles

[java]
//this calls an other android activity class, check android developer for more help
public void startInterferenz1(){
Intent intent1 = new Intent(myActivity, com.example.Interferenz.InterferenzActivity.class);
intent1.putExtra(“objekt”,(byte)1);
myActivity.startActivity(intent1);
}
[/java]
what is the reason behind this in your setup? how does this activity look?

Will check that if it will work on my system this morning.

It was nessesary to start an other activity from in my jme3game, do something, get a result, check in game,if passed , do something.

https://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/android/com/jme3/system/android/OGLESContext.java?r=7850
the error comes from this class i think row 164, i truly dont know

https://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/android/com/jme3/app/AndroidHarness.java?r=7850

and this is the androidharness if you can help me figure it out.

Your GameActivity.class + Game.class works
I made a new project and just copied them 2 classes + switch Manifest from MainActivity to GameActivity (forgotten it @ beginn)

wana go step by step throug it or should i try to make a video? would be my first youtube video so will take some time do set it up

yes but i would like to have a mainactivity. shouldnt do any difference, still im getting a damn exception… cant figure it out.

[java]startActivity(new Intent(this, GameActivity.class));[/java]

well youre saying that it works and im getting that my avd doesnt support opengles when i know it does. i can post an opengles project if you want