Android help - new device and .APK brings up error message.

Previous topic - Next topic

Ian Price

I've just got my first proper Android device (ignoring OUYA and GameStick) and have created a small dictionary program for a dyslexic work colleague.

No matter what I do I can't get the .APK to run. It installs, but when run I get an error message - "Unfortunately, dictionary has stopped."

I can install and run the GameStick version of AquaVenture on the device, but this dictionary.apk fails. I've tried cutting the program right back to a white screen saying "Hello" and it still fails.

I've tried signed and unsigned .APKs and ensured that Dev options are on etc. without much luck

Now as I'm new to proper Android I'm sure I've made a mistake somewhere along the line. Can someone test the attached on their device or give an idea why it might be failing.

Many thanks  :nw:
I came. I saw. I played.


Hello Ian, I get that error once in a while too.
If it is similar to mine, then here is a quick dirty solution:

Backup your project folder, delete the contents of the ANDROID folder on your dictionary project, copy the contents of the ANDROID compilation folder from a working project (ye aquaventure) to your dictionary one, recompile for android and give it a go.

Your problem might be related to some missing files, the icons for example, of your java version.
Either way, if what I said works (as it does here), then it may be easier for you to figure the problem.

...though I think it must be related to icon files.

Also, look at the compiling window just to make sure you don´t see things like debuf-certificate-expired.

I can send you an apk for testing just to make sure, or you head to the android resolution thread I did a few months ago and give a try on that APK as it should work perfectly. That way you rule out phone configs. 

Ian Price

I came. I saw. I played.

Ian Price

Hmmm. Nope. That didn't work.

I have icon128.png (128x128) and icon.png (512x512) and androidicon.png (72x72) - am I missing others?

No "debuf-certificate-expired" notice either.

[EDIT] BTW it's a small tablet (800x480) if that makes any difference?
I came. I saw. I played.


makes no difference.

head here:

there is an apk there on the 7th post (also the project).
Give that apk a go, let me know it goes.

That apk worked perfectly on 100% of the many androids I tested and people helped test too.
If it works, take a look at the project, it might make it easier to spot which files are missing.
If none, then it may be something related to the tablet or java.

Ian Price

Yep, worked on mine too. Your app doesn't use any AndroidExtras features, so I think I'll try stripping them out of mine and see what gives.

The tablet seems to be working fine (although it couldn't display images uploaded to my Dropbox account - perhaps they were too big or an unsupported format - I noticed your image was a .BMP, mine are .PNG so I'll see if that's the issue (and yes, I've checked case sensitivity)). My Java installation isn't likely to be the issue since I've compiled for OUYA and GameStick without trouble.

It's either something in my code or I've missed something out somewhere.

Cheers erico.

BTW did you test my .APK on your device?
I came. I saw. I played.


ops, didn´t notice attachment on the first post. :S

Just gave a go, it installs but when I run it I get the "unfortunately, dictionary has stopped".
It may be something on the code then, check the files on my project (ANDROID FOLDER) against your to see if there is something missing, specially icons.
It could be it.

I have the following files on project root:

I´m attaching them here so you check if that is the issue. (not sure here if all are needed, but my compilations work fine with that)

Ian Price

I've sorted it - it was nothing to do with the icons. :)

Once I'd removed everything AE related from the code it compiled and ran exactly as expected. Hmmmmm


Anyway, thanks for your help erico - without your example I would have kept trying with AE. :)
I came. I saw. I played.


Good to hear, but we should keep an eye here on why that happened with AE.
Spacefractal should be informed (he probably read this already or will at some point). :good:

Ian Price

When I get more time I'll investigate further, but I'm off to work in 10minutes.
I came. I saw. I played.


tested it. You are not alone with that extremly stupid error there was one of the AE versions recently. In logcat its wrote its could not locate android_JAVACALL, so none AE functions works at all. For some reasons its was replaced wih the stock version from glbasic, which was uncaugh in a recent version.

If you dont want to download the full thing again (newest update fixed that), then download the zip file here, extract sdl_main.cpp file in the zip to Compiler\platform\android\bin in the  glbasic folder.

Now AE should all works again. Sorry for that bug.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 -

Ian Price

I'm so glad it wasn't me, although it's usually me finding these bugs! :D

Cheers Alan.
I came. I saw. I played.



MrPlow did have that issue as well. Its property the most stupid one really. Its the main file that bind AE. That why logcat and adb is important. Here was the output when im tested it:

Code (glbasic) Select

Android Debug Bridge version 1.0.31
List of devices attached
c1607391b81267f device

--------- beginning of /dev/log/system
--------- beginning of /dev/log/main
E/AndroidRuntime( 4443): FATAL EXCEPTION: main
E/AndroidRuntime( 4443): java.lang.ExceptionInInitializerError
E/AndroidRuntime( 4443):        at java.lang.Class.newInstanceImpl(Native Method)
E/AndroidRuntime( 4443):        at java.lang.Class.newInstance(
E/AndroidRuntime( 4443):        at
E/AndroidRuntime( 4443):        at
E/AndroidRuntime( 4443):        at
E/AndroidRuntime( 4443):        at$600(
E/AndroidRuntime( 4443):        at$H.handleMessage(
E/AndroidRuntime( 4443):        at android.os.Handler.dispatchMessage(
E/AndroidRuntime( 4443):        at android.os.Looper.loop(
E/AndroidRuntime( 4443):        at
E/AndroidRuntime( 4443):        at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 4443):        at java.lang.reflect.Method.invoke(
E/AndroidRuntime( 4443):        at$
E/AndroidRuntime( 4443):        at
E/AndroidRuntime( 4443):        at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 4443): Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library[1307]:   110 cannot locate 'android_JAVACALL'...
E/AndroidRuntime( 4443):
E/AndroidRuntime( 4443):        at java.lang.Runtime.loadLibrary(
E/AndroidRuntime( 4443):        at java.lang.System.loadLibrary(
E/AndroidRuntime( 4443):        at<clinit>(
E/AndroidRuntime( 4443):        ... 15 more
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 -

Ian Price

Even if I used ADB and Logcat that would mean absolutely nothing to me. Other than soemthing is wrong - and I knew that already! :P
I came. I saw. I played.


Great news you having an Android device now...
Speccy-48k, Speccy-128k, Amigas, PCs