diff --git a/sdk/jme3-android/src/com/jme3/gde/android/AndroidSdkTool.java b/sdk/jme3-android/src/com/jme3/gde/android/AndroidSdkTool.java index 743663f6a..5e2f802a2 100644 --- a/sdk/jme3-android/src/com/jme3/gde/android/AndroidSdkTool.java +++ b/sdk/jme3-android/src/com/jme3/gde/android/AndroidSdkTool.java @@ -217,7 +217,7 @@ public class AndroidSdkTool { if (mainAct != null) { lock = mainAct.lock(); OutputStreamWriter out = new OutputStreamWriter(new BufferedOutputStream(mainAct.getOutputStream(lock))); - out.write(mainActivityString(mainJmeClass)); + out.write(mainActivityString(mainJmeClass, packag)); out.close(); lock.releaseLock(); } else { @@ -261,8 +261,9 @@ public class AndroidSdkTool { } } - private static String mainActivityString(String mainClass) { - String str = "import com.jme3.app.AndroidHarness;\n" + private static String mainActivityString(String mainClass, String packag) { + String str = "package "+packag+";\n" + + "import com.jme3.app.AndroidHarness;\n" + "import android.content.pm.ActivityInfo;" + "import com.jme3.system.android.AndroidConfigChooser.ConfigType;" + "public class MainActivity extends AndroidHarness{\n"