Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
APK creation. — Gideros Forum

APK creation.

VivekanandaVivekananda Member
edited June 2016 in General questions
Can anybody help me? I just want to create a simple apk.
I opened Gideros Studio (v2016.4 under Win 8.1) and loaded "Color Transformer" example. It worked well in my Local Player and in the mobile with apk player.
Now my problems are:
I'm using File - Export Project, selecting "APK" as architecture, and filling the information about package name (with "abc.defg.hijk"), Android directory (C:\Android-sdk), Java Directory (C:/Java/jdk1.7.0_75), Ant Directory (C:\E\eclipse\plugins\org.apache.ant_1.9.6.v201510161327), Android Target Version (19), clicked OK and choose the folder M:\giderosapks, clicked "Select Folder" and finally I can read "the project was exported successfully". But if i open the error.log (in M:\giderosapks), I see the message:
BUILD FAILED - M:\giderosapks\Color Transform\tmp\build.xml:90: Cannot find C:\Android-sdk\tools\ant\build.xml imported from M:\giderosapks\Color Transform\tmp\build.xml
What can I do? Do I have to copy my "ant" folder do android-sdk\tool\ ??
I copied it (from C:\E\eclipse\plugins\org.apache.ant_1.9.6.v201510161327) to android-sdk\tool, and renamed the folder to "ant". Now I've got a new error:

BUILD FAILED
M:\giderosapks\Color Transform\tmp\build.xml:90: Cannot find C:\Android-sdk\tools\ant\build.xml imported from M:\giderosapks\Color Transform\tmp\build.xml

But this little problem can't stop my stubborbness. I copied this build.xml file (from tmp folder in M:) to C:\Android-sdk\tools\ant\
Retried the export... And the error now is...

Exec: "C:/Java/jdk1.7.0_75/bin/java" -classpath "C:/E/eclipse/plugins/org.apache.ant_1.9.6.v201510161327/lib/ant-launcher.jar" "-Dant.home=C:/E/eclipse/plugins/org.apache.ant_1.9.6.v201510161327" org.apache.tools.ant.launch.Launcher release into M:/giderosapks/Color Transform/tmp
"C:/Java/jdk1.7.0_75/bin/java" -classpath "C:/E/eclipse/plugins/org.apache.ant_1.9.6.v201510161327/lib/ant-launcher.jar" "-Dant.home=C:/E/eclipse/plugins/org.apache.ant_1.9.6.v201510161327" org.apache.tools.ant.launch.Launcher release
BUILD FAILED
Target "release" does not exist in the project "ColorTransform".

Do I really have to create a "key store"? How can I create one? This is only a resume of everything that I tried to create an apk. Can somebody please give me a litte help?
Thanks for your attention

Comments

  • antixantix Member
    Hey @Vivekanada I'm not any expert on exporting and stuff but those versions of ant and java at least are old. It would be good to update yours.

    Apache Ant is up to 1.9.7, download that http://ant.apache.org/bindownload.cgi

    Java is up to 8.9.2 and you can get that http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

    I have found personally that if I don't set my target at at least 23 then my builds fail.

    I don't know if you need a key but you can findout how to make one on http://stackoverflow.com/questions/3997748/how-can-i-create-a-keystore page.

    I would recommend updating your Android Studio too.

    I hope it works, let us know :)
  • simwhisimwhi Member
    @Vivekananda See how you get on with @antix recommendations first. We can then help you further.
  • hgy29hgy29 Maintainer
    @Vivekananda,
    You shouldn't have needed to copy things around, you error.log tells that the build.xml file distributed along android sdk is not in the tools folder, where it used to be. Can you check your android-sdk ? Which version is it ?
  • antixantix Member
    Whoops, forgot about the Android SDK, update that too :)
  • First of all, thanks for your help. It was not easy, I spent a lot of time with uninstalls/environment variables settings/reinstalls (with recent versions), but the apk was created. However, my phone and and my emulators (Droid4x and Andy) are not able to install it. I have tested "Bird Animatin 2" and "Color Transform" gprojs.
    It seems that the SDK Manager it not working - clicking on it, it displays briefly a dos screen and closes. I tried to use tools\android.bat and it gaves me the following:

    Exception in thread "main" java.lang.UnsatisfiedLinkError: Cannot load 32-bit SW
    T libraries on 64-bit JVM
    at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
    (etc., etc...)

    Ops... 32-bit in 64-bit JVM? Any suggestion here? Should I install 32-bit sdk? And/or a 32-bit JDK?

    Somehow it seems that I was able to create a little apk (Bird Animation 2) with AndroidStudio connecting my phone via usb - an "little" means a "main.apk" with 272 kb. My emulador says "install success!", but trying to run it, all that I get is a message "bird animation 2 stopped". It doesn't work here, too.
    Well, at least I'm not feeling so depressed... Back to computer, uninstalling 64-bit things and trying to find the meaning of life with this 32/64-bit mix...

  • Ok... uninstalled jdk64, installed jdk32, and now AndroidStudio says that it only can uses 64-bit...
    :(
  • antixantix Member
    If you have a 64-Bit Os then Android Studio will require a 64-Bit JDK.

    I don't understand that if you don't have the required JDK installed, that Android Studio can actually compile anything. It is possible the APK you have is something leftover from a previous successful compile, even though it does not actually run.

    If you are exporting to a specific folder the Bird Animation example for instance.. Delete that export folder, then install the required JDK, then export the project again. Then compile and see how that goes.

  • SinisterSoftSinisterSoft Maintainer
    I use the ndk install from NVidia. I have no problems making an APK either using Eclipse or direct APK from within GiderosStudio. I use 64-bit Windows 10.

    https://developer.nvidia.com/codeworks-android
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • Ok, so I spent more time uninstalling/reinstalling everything, tweaking environmental variables and reinstalling android studio. I exported from Gideros (eclipse), and imported it in Android Studio, clicked the "run" button and suddenly... AS told me I had not a connect device, so I plugged the phone with an USB cable... it quickly detected my low cost chinese phone and installed the "Color Transform" apk. And it is running very well!!! SUCCESS!!! I tried it again, this time with the "Bird Animation 2" - and it worked!!!
    So i say a big THANK YOU VERY MUCH to everybody. Your suggestion really helped me.
    I don't know where the problem was, but it has disappeared. :)

    Likes: antix, simwhi

    +1 -1 (+2 / -0 )Share on Facebook
  • antixantix Member
    hey Vivekananda, that's great. Hopefully it doesn't go pear shaped on you again :)
  • simwhisimwhi Member
    @Vivekananda Well done. I'm glad that you managed to get over this first barrier. Your perseverance will pay off in the long term.

    Now that you have everything up and running, let's see what you can make!!!
Sign In or Register to comment.