I am trying to load map in my fragment Activity and getting the XML inflating error. The crash is only getting in Marshmallow (using Micromax AQ4501 - Android 6.0).
While googling i found same scenario Check out here
I tried the same and issue is solved by inserting SD card. But i need a right method to solve this. It may be very rare case and i cannot go for a SD availability check in all devices.Guide me to solve this issue.
Happy Coding !
The Issue was on "Micro-max Android one mobile" which was 6.0 Marshmallow. this device has not enough internal or external memory space.Even does not have SD card.
I gone through many sites and found problem was Updated Google Play services which require Space (updated Google photos ) that was not enough in my device and also one of the Error line was showing
"Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.io.File.mkdir()' on a null object reference"
I decided to check after installing SD-card. And it worked
Related
I am building a application in android which is mostly of pdf and documents in it
May i know how to resolve this issue?
**May i know how to load ,view all documents from less storage **
I am using below method to save one image file in the cache of my app.
File path=getActivity().getExternalCacheDir();
In my log i am getting that my image is saved in my internal storage of my phone
/storage/emulated/0/Android/data/me.XXX.xxx/cacheimagefile100.png and i can access that image file for sharing to other apps using intents. But some of the users using my app getting error in this line of code like
Attempt to invoke virtual method 'java.io.File android.app.Activity.getExternalCacheDir()' on a null object
I dont know why it is getting. Even my app is a using internal storage (OS VERSION Android 7) not the external SD Card storage cache.
Can anyone tell me what is the reason behind that?
What is the good fix for this?
I used getCacheDir() method. But when i am sharing the file through intent(Basically it is image) the image is empty and null. Tell me a fix for this.
A strange error opening a Google Drive file from a chooser which only starting occurring recently on one of the 2 devices I'm testing on.
The error returned from openInputStream() is:
java.io.FileNotFoundException: StorageFileLoadException[authentication_failure]
at android.database.DatabaseUtils.readExceptionWithFileNotFoundExceptionFromParcel(DatabaseUtils.java:144)
at android.content.ContentProviderProxy.openTypedAssetFile(ContentProviderNative.java:692)
at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1107)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:944)
at android.content.ContentResolver.openInputStream(ContentResolver.java:664)
at
...
Just to help anyone else who sees this error, perhaps you'll also find the solution is to update all the Google apps on the device (possibly Google Drive app was the essential one).
I've created an AVD, got it to work fine except when I try to add an sdcard to it it doesn't work. I don't get an error message or anything but when I push files onto it, they don't show in the gallery. Someone on a different post suggested just downloading a pic off the internet instead of trying to push one on so I tried that and got an error message that said
"No SD card
an SD card is required to download 01.jpg"
I've tried every solution I could find including going through the CMD and remounting the sdcard. Nothing worked. Any ideas? Why does it say "No SD card" when I already added it to the AVD? Why does it still say that after I've remounted it, which apparently is the only way to make it so I can push files onto it. That's how I got a different error message to go away! This thing has been one major headache after another! Once I solve or find a work-around for one problem another pops up almost instantly!!
Same problem i also faced but i got solution with following steps
1) AT the time of creating new AVD you have to give value in SD Card.
2) After starting the AVD insert the image that you want in AVD.
3) Next restart the AVD
Note : Enter SD Card value from 10 MB onwards if you give more it may not start AVD it will keep showing android.
this solution is worked for me, hope this will helps you.
I am not a new developer to android. I have an application on the market. However, sometimes I get reported strange exceptions to have occured:
java.io.FileNotFoundException: res/drawable-mdpi/background.png
android.content.res.Resources$NotFoundException: File res/drawable-mdpi/background.png from drawable resource ID #0x7f02001f
This is by all means untrue because otherwise I wouldn;t have compiled or run the program myself. Also I am sure the resources are there. This is just one of the exception I have been reported. There are same exceptions for other resources mainly layouts.
So my question is how would this happen? Is it because the android system has failed installing correctly my app? I almost sure this must be the case because I have many users who use it without problem.
Please help regarding this.
There can be several possible reasons:
Moving application to SD card.
There was some problem in downloading or installing APK from market (file can be corrupted).
User get APK with corrupted file from other source (for example via bluetooth from other user)
Some system bug (from software, to brocken hardware)
Any way You can't do anything with this problem.
Could it be that the application was pushed to SD Card and something happens to the drawable while on SD. I saw similar issues with layouts rather drawable and it was because the application was pushed to SD.
Maybe you have included certain codes that reference content from Android SDK.
In my case, I faced similar issue and when I removed the line
android:background="?android:attr/actionBarItemBackground"
from my xml, everything works fine again.