Cant start an android game without running out of heapspace memory?

Hi,

I’m not using the SDK to make games with jme thus I find no tutorials nor examples of code to use.

So I create after much work, a simple android activity extending AndroidHarness.

Sadly it can’t run.

All it does is print this message:

[2012-02-15 22:21:19 - AndroidDash] Dx 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.

Until it has run out of heap space and eclipse crash.

Quite useless application I must say.
My code was this:

[java]package andrew.planetdash;
import android.os.Bundle;
import com.jme3.app.AndroidHarness;

public class AndroidDashActivity extends AndroidHarness {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
System.out.println("Done");
}
}[/java]
But that just printed the message and then eclipse crashed.
So I thought I might remove the super constructor as it might start some process in AndroidHarness.
So I deleted it and here is my current code:
[java]package andrew.planetdash;
import android.os.Bundle;
import com.jme3.app.AndroidHarness;

public class AndroidDashActivity extends AndroidHarness {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
System.out.println("Done");
}
}[/java]

This code will never reach the println line. Why?
Also are there any examples of creating a simple application in android WITHOUT using the sdk? It's a serious drawback if it does not exsist. Maybe I can write one if I manage to fix this..
1 Like

All tutorial code works without the SDK. Its just that its too much to explain to users how to use the IDE of their choice as well, hence the comments on adding the libraries are specific to the SDK. Still if you set up your eclipse project like its said in the wiki and then paste in the code from any tutorial it works. If not thats your fault. Android development works like any android application, just that you have to extend AndroidHarness for your MainActivity, so again, if you chose another IDE just learn how to use it. Do you manage to create any android project at all? If not its maybe not the time yet to come to us with your issues.

1 Like