Discussion Forums  >  Crashes, Memory Warnings

Replies: 13    Views: 326

nosha
Lost but trying
Profile
Posts: 15
Reg: Apr 03, 2015
canterbury
150
11/12/15 10:16 AM (8 years ago)

App not working properly on Android devices and occasional crashing

OK, in two minds, if discussed before I haven't been able to find a previous thread, if not discussed before then it must be be. I've created an App through BT. works without fault on iOS, the exact same App on Android has been nothing but problems. The long and short is that I have created a menu based product to signpost people to get help, specifically those suffering domestic abuse and from crime I have located all the different agencies and using an App allows victims to find help that is tailored to their needs quickly and without multiple searches. It is free but has costed me hundreds of hours and the licence fees. The App opens to a main menu, the user selects a particular crime related need from the menu which opens a new menu with the agencies and help for victims etc, so isn't all that complicated. The problem is with the Android version, the wording in part of the menu's occasionally don't show up but the link is still there. refresh the screen and the words appear, but then other words don't. I had a version that contained images for all the icons and believed that Android was crashing with so many images and files (265 of them), so I made a really simple, simple menu driven one, no images, no files, literally just simple menus linking to external sites and external PDF's, but then when someone tried to download it again the simple menu had half the menu items missing, but the parts of the same menu were there (again the links were still there) -imagine 7 items in a simple menu, each leading to a new page. items 1 and 2 blank but 3 -7 were present. The thing is, Android shows no errors, my test tablet at home device shows it is working fine both as an emulator and having downloaded from the Google Play store. I am at the end of my tether, the present version is literally a simple menu plugin, html plug in and a pdf plug in - no other files, images splash screens or anything fancy. I did have some error code reported to Android from the more complicated version of the App that is on iOs but no code from this one. My knowledge of App building like most others is simple at best, the last 5 months building Apps has been like wading through treacle up hill in a high wind, while blindfolded. Please go easy and I appreciate any help offered.
 
nosha
Lost but trying
Profile
Posts: 15
Reg: Apr 03, 2015
canterbury
150
like
11/12/15 10:18 AM (8 years ago)
The location of the App on Google play is https://play.google.com/store/apps/details?id=com.dashforandroid4 I will try and find the error code report from the previous version.
 
nosha
Lost but trying
Profile
Posts: 15
Reg: Apr 03, 2015
canterbury
150
like
11/12/15 10:21 AM (8 years ago)
Here is the error message coding, it states Java out of memory which may be linked to the couple of hundred files images, but does not account for the same issues with the App that is just a couple of menu's...java.lang.OutOfMemoryError at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:596) at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:444) at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:832) at android.content.res.Resources.loadDrawable(Resources.java:2988) at android.content.res.Resources.getDrawable(Resources.java:1558) at com.dashuniversal.BT_fileManager.getDrawableByName(BT_fileManager.java:263) at com.dashuniversal.WB_rowImageMenu$ChildItemAdapter.getView(WB_rowImageMenu.java:681) at android.widget.AbsListView.obtainView(AbsListView.java:2608) at android.widget.ListView.measureHeightOfChildren(ListView.java:1259) at android.widget.ListView.onMeasure(ListView.java:1171) at android.view.View.measure(View.java:16831) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5245) at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1410) at android.widget.LinearLayout.measureVertical(LinearLayout.java:695) at android.widget.LinearLayout.onMeasure(LinearLayout.java:588) at android.view.View.measure(View.java:16831) at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:728) at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:477) at android.view.View.measure(View.java:16831) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5245) at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1410) at android.widget.LinearLayout.measureVertical(LinearLayout.java:695) at android.widget.LinearLayout.onMeasure(LinearLayout.java:588) at android.view.View.measure(View.java:16831) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5245) at android.widget.FrameLayout.onMeasure(FrameLayout.java:310) at android.view.View.measure(View.java:16831) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5245) at android.widget.FrameLayout.onMeasure(FrameLayout.java:310) at android.view.View.measure(View.java:16831) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5245) at com.android.internal.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:302) at android.view.View.measure(View.java:16831) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5245) at android.widget.FrameLayout.onMeasure(FrameLayout.java:310) at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2586) at android.view.View.measure(View.java:16831) at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2189) at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1352) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1535) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1249) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6364) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:791) at android.view.Choreographer.doCallbacks(Choreographer.java:591) at android.view.Choreographer.doFrame(Choreographer.java:561) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:777) at android.os.Handler.handleCallback(Handler.java:730) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:176) at android.app.ActivityThread.main(ActivityThread.java:5419) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:525) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862) at dalvik.system.NativeStart.main(Native Method)
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
11/12/15 10:39 AM (8 years ago)
Hi The link you provided is your private link to your account in Google Play as a publisher. I could not find the app there since I do not have the proper password, nor could I deduce the name of the app from your post, so no luck there. Actually, may I suggest that you erase that link in the previous post, your account should not be public, to say the very least. Neither could I deduce anything from the listing you provided. To be useful, the listing must contain at least one reference to the plugin code that you used in your app. As for the out of memory error in general, in Android, that would be because your images are too large. Which plugins did you specifically use for the Android version? PDF and HTML come out rather easily on iOS but are very problematic as BT plugins for Android. Just plugging on a plugin in and expecting everything to work on Android just because the same plugin works flawlessly on iOS, may lead to bitter disappointments. Please try to be as specific as possible otherwise how can we help you?
 
nosha
Lost but trying
Profile
Posts: 15
Reg: Apr 03, 2015
canterbury
150
like
11/12/15 10:52 AM (8 years ago)
Dusko, appreciate the feedback re the link. Yep, your post confirmed my lack of knowledge all in one hit. I have now changed the link in the second posting. It is only in UK stores which may affect access from other countries, haven't tested this theory. In terms of the plugins, these were the ones compiled in the BT package before downloading the zip file and then opening in Android. They are Menu simple, Custom HTML, Custom URL and PDF doc (the plug in's that come free with the BT account). I don't have any issues opening PDF's and accessing HTML wording which I have to say works flawlessly for me, it is however, the menu wording which is only partly present. Or is it possibly that the HTML and PDF plug ins that are affecting the simple menu? The basic version I have at the moment, is really very basic and apart from a couple of links comprises 8 menu's and a couple of custom HTML docs so no images, but still the same issues. I am really trying to be specific, I do apologise, it is such a bizarre issue and I am under intense pressure to find a solution asap. I couldn't make head nor tail of the error code either.
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
11/12/15 11:13 AM (8 years ago)
> Menu simple, Custom HTML, Custom URL and PDF doc OK, now run the app again and try to catch in the console output where one of these plugins appears. There should be one line from which we can try to deduce where the error is. Also, I found it in the Google Play, but it says This app is incompatible with all of your devices. That is strange because I have 2.3 devices and 4.4.2 devices so that should cover everything, except that it doesn't cover your app. With which version of SDK did you create your app? BT works with version 14 and it is a must, have a look at your build.gradle (module app) file in Android Studio, or better yet, reproduce it here, maybe we can see from that what the problem is.
 
nosha
Lost but trying
Profile
Posts: 15
Reg: Apr 03, 2015
canterbury
150
like
11/12/15 11:32 AM (8 years ago)
ok, thanks so far. The latter will take a little time. Have a 5 year old running around me now and dinner to make!
 
nosha
Lost but trying
Profile
Posts: 15
Reg: Apr 03, 2015
canterbury
150
like
11/12/15 12:53 PM (8 years ago)
Now thats interesting. Have just checked my API's and only had 5.0.01 and higher. Would this be the cause? I'm now downloading the earlier versions...
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
11/12/15 01:04 PM (8 years ago)
That is most certainly the cause; BT works, needs, wants, and insists only on version 14 and 22.0.1. for build tools.
 
nosha
Lost but trying
Profile
Posts: 15
Reg: Apr 03, 2015
canterbury
150
like
11/12/15 01:06 PM (8 years ago)
Well, I thought I was up to date on all the API's, but appears since day one the Android Studio only added the later tools and selected services. I will now download the lot. You very well may be the saviour of my computer as it was about to be launched out the window in pointless rage. I'll load it all, recompile the Apps and try again. I'll update you but as it stands presently, thank you.
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
11/12/15 01:27 PM (8 years ago)
You are most welcome. There is a PDF document that comes with every download of the app. Read it, it shows exactly what must be present for BT to work. To download version 14, activate button Obsolete in the SDK manager.
 
krompa
Lost but trying
Profile
Posts: 257
Reg: Jun 14, 2013
Bristol
8,820
like
11/13/15 03:36 AM (8 years ago)
Hi nosha I have just downloaded the app and tested. The menus items are all visible. PM me if you want some screenshots. Tip - You may want to delete a few of the unnecessary permissions from the Android Manifest file. Your target end-users may be a bit perplexed by the permissions required when they download the app from Google Play.
 
Sherry
Lost but trying
Profile
Posts: 135
Reg: Jan 05, 2013
South Africa
11,650
like
11/13/15 04:37 AM (8 years ago)
Hi Nosha Another thing that I did when my android app was crashing because of memory issues after opening about 15 pdf files one after the other was to add this sentence to the Manifest file: android:largeHeap="true" I added it under the application heading so <!-- application --> <application android:name="your app" android:icon="@drawable/icon" android:label="@string/app_name" android:theme="@style/hostThemeWithTitle" android:hardwareAccelerated="false" android:largeHeap="true"> I hope this helps you it did seem to help my app.
 
nosha
Lost but trying
Profile
Posts: 15
Reg: Apr 03, 2015
canterbury
150
like
11/13/15 11:11 AM (8 years ago)
Just got in from work, thank you Sherry and Krompa, will look to enact these changes as well.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.