[Tutorial] Android: Exporting To Eclipse

Re: [Tutorial] Android: Exporting To Eclipse

Postby lcocea » 2013-09-19 22:09

This tutorial is great, however it's missing the lib addition (native libs compilation & libopenal.so copying) steps as per this tutorial.
lcocea
Platinum Boarder
Platinum Boarder
 
Posts: 574
Joined: 2012-06-07 03:12

Re: [Tutorial] Android: Exporting To Eclipse

Postby shreya.pandey » 2017-10-10 10:18

Selzier wrote:Android: Exporting To Eclipse

TUTORIAL:

-- From Game Editor: Game > Export > Runtime Package (.stk) > Android

Image

-- Open ShiVa Authoring Tool, UAT. Select Android and for Application Pack, pick the exported .stk file. Now go to Step 2 and for Authoring Type, select Project. Give the game a bundle identifier & version.

Image

-- For Step 3: Build I suggest setting it up like this:

Image

-- Now, Build the project. This is going to generate a GameName_Android.zip that is imported into Eclipse. Open Eclipse and select: New > Java Project > Type a Project Name > (use all defaults) > Click Finish.

Image

-- Right Click on your Project Root > Import > Archive File. Now select your GameName_Android.zip that was exported from ShiVa Authoring Tool and click Finish.

Image

-- Right Click Project Root > Android Tools > Fix Project Properties.

Image

-- Open "ant.properties" and add this line:
Code: Select all
renderscript.opt.level=O0

Image

-- Open "build.xml" and change line 49 & 66 to:
Code: Select all
<arg value="cd &quot;${basedir.app}&quot; &amp;&amp; /cygdrive/C/Android/NDK/ndk-build &amp;&amp; cp --preserve obj/local/armeabi/libopenal.so libs/armeabi/libopenal.so &amp;&amp; cp --preserve obj/local/armeabi/libssl.so libs/armeabi/libssl.so &amp;&amp; cp --preserve obj/local/armeabi/libcrypto.so libs/armeabi/libcrypto.so &amp;&amp; mkdir -p libs/armeabi-v7a &amp;&amp; cp --preserve obj/local/armeabi-v7a/libopenal.so libs/armeabi-v7a/libopenal.so &amp;&amp; cp --preserve obj/local/armeabi-v7a/libssl.so libs/armeabi-v7a/libssl.so &amp;&amp; cp --preserve obj/local/armeabi-v7a/libcrypto.so libs/armeabi-v7a/libcrypto.so"/>

Image

-- Open src > com.example.gamename > GameName.java. Do a search for "onDestroy". Add the following line to the END of the onDestroy method:
Code: Select all
System.exit(0);

Image

-- Now you are ready to compile the .APK file. Right click on build.xml > Run As > Ant Build:

Image

-- BUILD SUCCESSFUL! The Eclipse Console will tell you were your APK file is. Copy it to your Android Device and play!

Image


You can find android tutorials here as well: https://hackr.io/tutorials/learn-android-development
shreya.pandey
Fresh Boarder
Fresh Boarder
 
Posts: 3
Joined: 2017-10-05 14:47

Previous

Return to User contributions

Who is online

Users browsing this forum: No registered users and 3 guests

cron