GLBasic forum

Main forum => GLBasic - en => Topic started by: kwagner on 2014-Oct-01

Title: Android "App not installed" error
Post by: kwagner on 2014-Oct-01
Hi everyone,
been a while since I've checked in on GLBasic and happy to see good progress :) I'm trying to test an android export of my game, but running into some issues. I don't have an android device to plug in and my laptop doesn't support the intel hardware acceleration, so I have the emulator running on a second computer.

The build process runs successfully (well, up to the point that it tries to use adb to talk to my local device, which I don't have, so I kill the task). I also used the instructions on the "compiling for Android" section of the main website to build the 'signed release' version, which is also successful. I then take both apk files and put them on my website, and use the browser on the emulated device to download them. That works. When I go to install, the icon shows up right, it mentions some permissions, then gives me the option to install. If I click that, I get "App not installed" and a "done" button.

This is a clean emulator image, and the 'use third party apps' box is checked in the security settings. I cleaned up all extraneous stuff in the code's folder, leaving just the code, the Media folder, and an icon.png. Everything I've searched on this forum and online points to the apk already being installed (it wasn't), having some signing error (not that I know of), or a corrupt apk (I've tried multiple uploads and downloads). I don't see a way to get any more info. Any ideas?  :doubt:
Title: Re: Android "App not installed" error
Post by: erico on 2014-Oct-01
Did you also try it on any real device?
If it is an apk test you can post, I can give a go, but I´m not sure about emulators, I know very little about them working with GLB and one that I saw working had the portrait/landscape issue.
Title: Re: Android "App not installed" error
Post by: spacefractal on 2014-Oct-01
there is various issues with stock glbasic, which was why im created Android Extras. Example im removed the auto install feature, which im newer was fan of.

Howover, which Java version does you uses, and do you uses glbasic-debug.apk? this is the only apk you should required to install the debug.

Sometimes if a app did fails falf under the install, you might needs to uninstall this first, before you can retry.
Title: Re: Android "App not installed" error
Post by: kwagner on 2014-Oct-01
I used jdk 1.6 update 45, as that seemed to be what the instructions used and I wanted to eliminate java issues.
I tried both the glbasic-debug.apk and glbasic-release-signed.apk
I tried installing on a clean new emulator, so there was nothing to uninstall.
I will try giving the apks to a friend with an android device and see if they work. If not, I'll try a "hello world" version to eliminate coding issues.

Is that "android extras" available to try? :)
Title: Re: Android "App not installed" error
Post by: MrTAToad on 2014-Oct-01
Several problems could cause this : Incorrect signing code or not enough space.

If you are using the latest Java stuff, the signing system has changed (thanks to Sun).  You need :

Code (glbasic) Select
keytool -genkey -alias keys/mykey.keystore -validity 20000 -sigalg MD5withRSA -keyalg RSA -keysize 1024 -keystore keys/mykey.keystore -storepass %2
jarsigner -verbose -keystore keys/mykey.keystore -sigalg MD5withRSA -digestalg SHA1 -signedjar "%1-signed.apk" "%1-unsigned.apk" keys/mykey.keystore -storepass %2
zipalign -v 4 "%1-signed.apk" "%1-release.apk"


Can you make the APK available ?
Title: Re: Android "App not installed" error
Post by: kwagner on 2014-Oct-01
I just made a simple hello world based off the atan example code, and I get the same issue.
You can give it a go here:
http://elusivegames.com/android/hello-debug.apk
http://elusivegames.com/android/hello-release-signed.apk
Thanks :)
Title: Re: Android "App not installed" error
Post by: MrTAToad on 2014-Oct-01
They both install fine on Andy (which is Android 4.2.2) - now will try on later devices
Title: Re: Android "App not installed" error
Post by: erico on 2014-Oct-01
Tried the Hello World on my galaxy note 2 with kitkat, works fine as it should.
Tried on Bluestacks, worked fine too.

In both, I get the rays and text on a top left area of the phone when holding portrait.

So, it seems your compiling process is doing fine to create an apk...
Other visual intensive applications works on your current emulator? (so we rule opengl out?)
Something must be strange on your emulators maybe? (Does it need any special config to run an unassigned apk?)
Title: Re: Android "App not installed" error
Post by: kwagner on 2014-Oct-01
Yeah I had some people try it on actual devices and it worked fine. I'll chalk it up to an issue with the android sdk emulators.
I tried andy and bluestacks last night, but couldn't figure out how to do anything with them, maybe it was just my screen. I'll give them another shot.

What's the secret to having the game scale to the size of the device? The one i tried was 320x480.
Title: Re: Android "App not installed" error
Post by: MrTAToad on 2014-Oct-01
In your project settings, I think you need to use a resolution of 9999 x 9998
Title: Re: Android "App not installed" error
Post by: erico on 2014-Oct-01
Here is a technik to scale with virtual screen:
http://www.glbasic.com/forum/index.php?topic=9848.0
Title: Re: Android "App not installed" error
Post by: spacefractal on 2014-Oct-01
scaling is something you needs to do your self, which can been done in various way. There is a virtual way and there is a direct way. The direct way is harder to code, but is also much faster throught. Glbasic dosent do that for you. On Android there is about 117 resolutions out here.
Title: Re: Android "App not installed" error
Post by: kwagner on 2014-Oct-02
Yeah, I've done a phonegap/cordova project before and all the resolution options can be a pain to say the least. Thanks everyone for the help. I'll be checking out links and more searching on the forum for scaling ideas. I did try bluestacks again and figured out how to use it, must've just been too tired yesterday. Now I've at least got a system to work with. Thanks! :)
Title: Re: Android "App not installed" error
Post by: MrTAToad on 2014-Oct-02
Works fine on 4.4 here too