Page 1 of 1

APK builds and installs but won't run

Posted: Tue Aug 12, 2014 9:33 pm
by Tukcedo
Hi there!

I've just started with LiveCode and am still getting familar with various aspects such as databases and mobile functions. To play with the latter I hooked up my Sony Z1 Compact. After some initial problems I finally got the stack to install on the Z1. However it won't run. I can see a screen flicker (presumably it starts up then dies immediately). I believe that the problem is somewhere in logcat, possibly this "No content provider". I've read about the /data/local directory but since the device isn't rooted (and I don't really want to either), I can't even see that directory. Any ideas? LCC 6.6.2

W/ActivityManager( 998): No content provider found for permission revoke: file:///data/local/tmp/file9wZZPU

Re: APK builds and installs but won't run

Posted: Tue Aug 12, 2014 10:14 pm
by Simon
Hi Tukcedo,
Have you tried with just a "Hello world" example on the Z1?
Probably best to start there, then deal with added code.

Simon

Re: APK builds and installs but won't run

Posted: Tue Aug 12, 2014 10:44 pm
by newtronsols
A good demo to try is:

http://forums.livecode.com/viewtopic.ph ... id#p107177

Simply extract the mgscrollerazindexdemo.zip from the zip file, and test in LC via USB - it works straight away on my Android phone.

Re: APK builds and installs but won't run

Posted: Wed Aug 13, 2014 11:35 am
by Tukcedo
Good tip to try a simple Hello World: that worked. But now I'm left with: what part of the code that I added above the simple 1 button it doesn't like? I find this really puzzling to be honest. Where do I go from here?

Re: APK builds and installs but won't run

Posted: Wed Aug 13, 2014 12:46 pm
by Mag
Maybe you could open Eclipse and see the log for that device to see if there is some useful info.

Re: APK builds and installs but won't run

Posted: Wed Aug 13, 2014 6:32 pm
by Simon
Hi Tukcedo,
Go through your code and make sure you haven't used any iOS only commands/functions. There are plenty of them.
Good to hear you can run apps on the Z1.

Simon

Re: APK builds and installs but won't run

Posted: Wed Aug 13, 2014 9:21 pm
by Tukcedo
This is the weird thing: it's just REALLY simple code. Most not even working yet (just started ...), so it's a bunch of (code-less) text entry fields, couple of buttons. Uses SQLite (which works fine in the IDE). If THIS doesn't even work I fear the worst for when I dig in. I'll try and expand the Hello World a little but I'm truly in the dark here :-(

Re: APK builds and installs but won't run

Posted: Wed Aug 13, 2014 9:24 pm
by sefrojones
Tukcedo wrote: Uses SQLite (which works fine in the IDE). If THIS doesn't even work I fear the worst for when I dig in. I'll try and expand the Hello World a little but I'm truly in the dark here :-(

Is SQLlite checked in your standalone setting? Also probably Allow external storage.

--Sefro

Re: APK builds and installs but won't run

Posted: Wed Aug 13, 2014 9:43 pm
by Tukcedo
Bingo! Added fields and buttons, everything still ran. However, then I checked "Standalone Application Settings" -> Android -> "Externals/SQLite" and it stopped working!

I haven't actually added any of the revXXXX database calls yet, but would these still work leaving that checkbox cleared?

Re: APK builds and installs but won't run

Posted: Wed Aug 13, 2014 9:47 pm
by Simon
Hi Tukcedo,
I can assure you that SQLite and mySQL do work on mobile (iOS and Android).
Are you including a database with your stack or building it on the fly via liveCode?
specialFolderPath "documents" should be used in either case as a db included via the Copy Files will end up compressed in specialFolderPath "engine" and you don't want to decompress every time you use it, look it up in the dictionary.
but would these still work leaving that checkbox cleared?
Nope

Simon

Re: APK builds and installs but won't run

Posted: Thu Aug 14, 2014 12:01 pm
by Tukcedo
Thanks Simon, that may be the problem then as I had them located in "Home"! Incidentally, you also answered a question I had about how to distribute a database along with the package. I'll give it another try later.

Re: APK builds and installs but won't run

Posted: Thu Aug 14, 2014 5:54 pm
by Tukcedo
Hmmm I changed the path to "documents" but as soon as I use the SQLite checkbutton it bombs out again. Did a filter on *.E and name of my Identifier and then I believe the below is the culprit:

Code: Select all

E/dalvikvm( 8134): dlopen("/data/app-lib/nl.tukcedo.war-2/librevdb.so") failed: dlopen failed: "/data/app-lib/nl.tukcedo.war-2/librevdb.so" is too small to be an ELF executable

Re: APK builds and installs but won't run

Posted: Thu Aug 14, 2014 6:10 pm
by sefrojones
Have you tried checking write external storage as well? I seem to remember needing that permission to get it working.....

Re: APK builds and installs but won't run

Posted: Thu Aug 14, 2014 9:41 pm
by Tukcedo
Tried that too just now, no luck ...

Re: APK builds and installs but won't run

Posted: Sun Nov 02, 2014 12:32 am
by MaxV
The problem is in the APK file. The APK file is just a zip file, try to unzip it and you'll get the following folders:
  • assets (containing accessories file)
  • lib/armeabi/
  • META-INF
  • res
the lib/armeabi/ folder contains at least 3 files, but two are empty for a bug: libsqlite.so and librevdb.so.