My app doesn't read added images - android

Good morning,
Yesterday I updated my Android Studio software to the latest version. From now, my app keeps stopping when I run the apk built in the software. I noticed that when I deleted all the images and icons of the app screen the app worked. So I see that when I use: "android:background: #drawable/... " the app will crash in after running the apk. I don't know what happens, because yesterday the app worked very well also with the images or icons in the screen. Please I ask for help, because my app development is now blocked. Thank you so much!

There could be many reasons for this. I would suggest to not keep every image in the drawable folder. Instead, keep them in folders according to their size
ldpi = 240×320 pixels
mdpi = 320×480 pixels
hdpi = 480×800 pixels
xhdpi = 720×1280 pixels
Refer this link for details

Related

App install size the same on different device types

When I install my app on my main/new phone, the installed size is around 18.5MB
and when I install my app on an old Samsung Galaxy Ace (Mk1), for some reason, it installs with pretty much the same size, as you see here:
It runs perfectly on my main phone, but obviously, the old Galaxy Ace really struggles with it.
Now, I download a random game from the Play Store and with that one you can see the results here:
Much better, it takes up less space on the less capable phone than it does on the more capable phone.
However, my question is, where can I start to try to figure out why my app doesn't exhibit this desired behaviour?
Information about my project
I have provided 4 sets of Graphics within my project and they are:
Graphics
XHDPI: Total of 3.73MB
HDPI: Total of 2.87MB
MDPI: Total of 1.33MB
LDPI: Total of 1.03MB
Sound
OGG Sound Files: 202KB
MP3 Soundtrack: 5.6MB
The (Unsigned and signed) APK file is about 16.02MB
Apart from that there is a classes.dex file within the APK which is about 3.5MB.
In Eclipse, I link BaseGameUtils and Google-play-service-lib jar files.
I know that my game is slightly more resource hungry than the other game I downloaded - but that isn't the point of this question. I need to make sure that the size of the installed app is smaller on lesser capable phones than it is 'better' ones but as you can see, mine is exactly the same.
Any help would be appreciated.
Edit
Additional information if it helps:
The Samsung Galaxy Ace is running Android 2.3.4 Gingerbread
The other phone is running Android 4.4.2 Kit Kat
the answer is the picture.. you see android apps can specify locations where apps are supposed to be installed, whether internal or external- you can do that in your android manifest file
android:installLocation="auto"
Looking at your app you from the settings screenshot you have not specified that element in your manifest hence the "move_to_sdCard button" is inactive. Your apps installs in internal memory
coming to the other app, looking at the screenshot you will see that the "move_to_phone button" is active because they specified that feature hence since there wasn't enough space on your device it automatically installed your app on the internal-external memory or strictly external memory.. But when that feature is set not all resources or files are installed on the internal-external memory they are shared, so the size gets trimmed in the process hence that ouput.
Speaking about the lag of your app, you need to digg into your codes pretty much. also newer apis contain functions the old ones do not have, hence you need to re-evaluate the kinds of codes you choose..
Hope i am lucid enough
Probably the "Other App" is using the Multiple APK technique to publish the App on the Play Store. With this feature you can build and deploy several apk(s) each targeting a specific device density screen. In this way you can reduce the apk dimension since each apk will have only the resources for his target and automatically the Play Store will deliver the correct one.

Porting Android application to BlackBerry 10 - image sizes documentation?

I can successfully port my android application to bb10 via eclipse plugin that BlackBerry provides and launch my app in BlackBarry 10 simulator.
Here is my problem. Images in my application are not seems ok. They are scaled and distorted.
I searched but couldn't find a documentation about proper image sizes (except app icon)
Is there a documentation for that? Or how do you use your images?
Thanks
Did you provide xHDPI images in your application? If not, it's an expected behaviour

Application icon corrupt in Android Market

I've recently published an app in the Android Market. My APK contains icons for res/drawable-hdpi, drawable-ldpi and drawable-mdpi. The icon files are perfectly valid - saved by Adobe Illustrator and show without problems in all browsers, Photoshop, Paint and Paint.NET. Icons are grayscale, but stored in 32Bit PNG.
For some reason, Android Market on phones and Developer Console show a garbled version of the same icon. It looks like my nice gradients are reduced to dotted, black and white mess.
Now, I suspected pngcrush / some similar APK optimisations, but the optimised, 8-bit PNG in the final APK are still perfectly renderable in all browsers etc. Also, the menu on the phone renders it without problems.
Any help appreciated.
ANSWERED:The cause appears to be in the scaling algorithm used by Android Market backend. I've resolved the issue by replacing pure black surfaces RGB(0,0,0) with almost-entirely-black RGB(1,1,1) and the problem's gone away.
The cause appears to be in the scaling algorithm used by Android Market backend. I've resolved the issue by replacing pure black surfaces RGB(0,0,0) with almost-entirely-black RGB(1,1,1) and the problem's gone away.

Looking for image in android.R.drawable

I'm looking for a system-wide graphic that (I think) is in android.R.drawable. I am looking for this one:
I realize that graphics differ between systems, however I am fairy sure that it is system wide because I have seen it in multiple programs.
I want to use the one Android provides so that my app looks good no matter what phone it runs on. Does anyone know where I can find that image to use in my program?
Taking a look at Android R Drawables, it seems it might be expander_ic_minimized.9
You can find those images in the Android SDK directory under
platforms/android-X/data/res/drawable-Ydpi
where X is the version code of Android and Y is the resolution (l/m/h). Most images are in the mdpi folder.
It is recommended to copy the images to your App, as the Android developers do not guarantee that all images will be there in future releases.
The image you are looking for looks like
expander_ic_minimized.9.png

Application icon not transferred to Android device

I want to deploy my application with Android 2.1 features. I placed an application icon in PNG format in the drawable-ldpi,and drawable-hdpi folders. When I installed to the device, it is not showing the application icon on the home screen of the device.
Please help me how to solve this issue?
I ran into a problem like this before.
My app wasn't changing name and icon, even with everything changed in manifest and icons in drawable folders.
It seems like it had some sort of cache, which installed the same old config (although coding was changing).
Restarting the phone solved my problem.

Categories

Resources