I've been programming some Kivy/Python apps on my Motorola Moto G mobile phone.
I've got a few handy little apps, that have been working OK for a few months.
Today, I launched one of the apps - through the QPython interface, and it didn't work.
So, I tried another of my apps and that failed to launch for the same reason. In fact, all of them fail to launch for the same reason.
The error shown on screen ends with:
File "/QPython/core/build/python-install/lib/python2.7/UserDict.py", line 23, in getitem
KeyError: 'ANDROID_APP_PATH'
I presume that something on the phone has taken an upgrade - and broken something.
I assume that is the case because this problem affects all of the Kivy apps I was using.
Anyone else encountered this?
You need to have
#qpy:kivy
part in the first line.
At least that was what happened to me.
I suppose that is because QPython is finding what type of app is it.
Related
I'm getting strange behavior on Android where my taps on TextInputs and Buttons are not doing anything. On the TextInputs I see the little text cursor flash for a millisecond. It happens on both a Huawei P8 physical phone and a Samsung Galaxy S6 virtual device. iOS works perfectly.
There are no errors in the developer console, however I do have to install the app on the phone like this: $ adb install android/app/build/outputs/apk/app-debug.apk otherwise it says "failed to install all". I don't think this is related because I have always been installing it that way and I haven't had this issue in the past.
It might be a duplicate of this question but it has no answer.
Any ideas why the taps on TextInputs and Buttons don't seem to do anything on Android? The fact it works on iOS makes me think it isn't code related.
I wasn't sure which part of the code was causing it. So I deleted components until the app worked. I had an extra closing curly brace } in the JSX of one of my components. Interesting that iOS worked and Android didn't.
Right after start of app, my app crushes without error message on a device. This only happens on Samsung Note 1(at least, can't test on all devices), but not on Motorola Moto G or Galaxy s4mini. The only hint I get is in the debugger. I pasted it below. What exactly is happening and why it crashes only on some devices?
Edit: it crashes also on return to the app from "running apps" menu. Note 1 has CyanogenMod installed. Maybe this has something to do with the crashing.
Edit2:Another observation: note 1 allocates only a half of the memory as the other two devices. Has this anything to do with the crash?
01-05 17:00:16.212 13486-13513/com.mygdx.myGame.android D/dalvikvm: Trying to load lib /data/app-lib/com.mygdx.myGame.android-2/libgdx-freetype.so 0x42441a58
01-05 17:00:16.222 13486-13513/com.mygdx.myGame.android D/dalvikvm: Added shared lib /data/app-lib/com.mygdx.myGame.android-2/libgdx-freetype.so 0x42441a58
01-05 17:00:16.222 13486-13513/com.mygdx.myGame.android D/dalvikvm: No JNI_OnLoad found in /data/app-lib/com.mygdx.myGame.android-2/libgdx-freetype.so 0x42441a58, skipping init
The function "JNI_OnLoad" is not essential for an android app. It is not even an error. Your problem is from another part of your code. Even if you have not provided this function, your program should run normally.
References on JNI_OnLoad which can be helpful - Link 1 | Link 2 | Link 3
There is a way to fix it though-
Try to use ndk-gdb to fix it.
References for ndk-gdb - developer.android.com | Stackoverflow
I do have this issue in like most of the projects I have worked on. It is nothing related to Android app getting crashed.
There is something else in your app that is crashing. Some tips to consider which will help you debug-
Check Playstore(if its on playstore) for logs(what exactly the error is). They give stack trace which helps to debug.
If its not on Playstore, only way to go forward is to do remote debug on the mobile which is giving the error.
I have had such experiences, and its MOST OF THE TIME because of API change. What I mean is, APIs would have changed from one Android version to another(Kitkat to Lollipop - there are lots of breaking changes!) Check this once. Most of my apps had lots of issues because of this.
Some mobile's are strict when it comes to DB(sqlite or whatever you use on the phone) transactions. I mean, in one of the application, when the DB was not closed at the end of all transactions, the app was getting Force closed in most Samsung & HTC mobile phones. While it worked very well on most other phones.
Hope it helps :) Happy coding!
Note to self: "Always use asset manager and texture atlases"
Over the course of developing I eventually replaced all textures with texture atlases and combined with asset manager. I didn't change any logic at all. Somehow the app stopped crashing. Can't explain it but I thing the asset manager and texture atlases did the trick.
I am trying to wrap my head around Android Widgets, using the sample provided here: http://code.google.com/p/wiktionary-android/
I have corrected the strings.xml but the plugin will not work properly, neither on the emulator nor on the actual phone. It installs fine, but it never updates.
But at least on the simulator i get some DDMS output, telling me, that the API-response could not be parsed, so I assume, that the Wiktionary API has probably changed.
However, on my phone, the public void onUpdate(...) method doesn't even seem to get called at all when I install the Widget. I have inserted Log.i(...) lines for debugging and while they all show up when I use the Widget on the emulator, none of them seem to come up when it actually runs on the phone.
The phone is a Samsung Galaxy S II running android 2.3 but that hardly matters I think.
has anybody encountered this before and knows anything that might help?
EDIT I was told it might be a permissions issue, but could not verify this.
OK. Just in case anybody else ever comes across this. There is a strange thing with android widgets when the throw an exception... just uninstalling isn't always enough one hast to restart the phone.
Can not explain why that is but it always did the trick.
I have recently completed development on a game for Android smartphones.
It was designed using the android 2.1 sdk and runs no problem on my test devices a 2.1 samsung galaxy europa and a 2.2 samsung galaxy tab and seems to run fine in the emulator for 2.3.3.
Up until recently it ran fine on my friends HTC desire S but suddenly it stopped working, crashing on start.
It would appear that the error is caused by a resource not being found.
This code has not been touched for the past 2 months and ran no problem on my 2.1 and 2.2 devices but I must have done something. It seems that suddenly that some phones can't see the resources but unfortunately I cannot replicate this bug and my friend is not around enough and is getting quite pissed at me for pestering him for me to take his phone and keep trying to fix it.
Any help would be much appreciated as this is driving me mad especially as I cannot replicate this bug with any of my equipment. I haven't even got a confirmation that it works on 2.3.3 as the people who have downloaded my app aren't leaving any useful feedback or submitting many error reports. Hopefully it is just a bug with HTC's variant of android.
I sometimes have errors like this when I'm rapidly iterating (tweak/test) on the emulator. They're usually solved by doing an "ant clean" and then recompiling. You could try cleaning and then doing a fresh build, installing it on your friends device, and then seeing if you still get the error.
-Kurtis
Have you considered/researched whether or not this actually is a resource problem...meaning does this resource actually exist in the folder Android is trying to draw from?
I'm currently facing the crash in a production application and have found the problem. This crash is only happening on HTC devices. Seems like HTC changed the core Android method that decode a Resource.
The documentation of BitmapFactory.decodeResource says :
Returns
The decoded bitmap, or null if the image could not be decode.
But HTC version of that crashes :(
In my case, I had mis-placed the "xml" folder. It was on the root of the project, but just moved within "/res" folder and the error was gone.
I get the following error on my Android device:
E/OsclNativeFile( 1616): OsclNativeFile::Seek lseek64 failed
I want to know what it means, because I wasn't making anything special just getting a battery drain and the logcat show me zillion lines like the above. Thanks.
I got the same. That happened after i had updated my LG Optimus One P500 phone to android 2.3.3. I read this topic with no answers and was a bit disappointed. I tried to come back to 2.2, but phone didn't start (it stopped at android logo). I installed 2.3.3 again and it started normally. Then i experimented and soon noticed that there was no errors with sd-card unmounted. So I removed all programs from sd-card, and deleted all files from it (I moved it to laptop). And I have no such errors now. Maybe there is an easier way to solve it, but it has worked in my case.
The lseek64() system library function is typically used to access large files (2GB or greater). It's possible there's a flaw with the way the platform implements lseek64. A workaround--as tonixart has discovered--is to delete the large files on your sdcard.