Android trying to load a resource that is not declared - android

I have several crash reports with the following error:
Caused by android.content.res.Resources$NotFoundException: File res/drawable/ic_keyboard_arrow_right_black_24dp.xml from drawable resource ID #0x7f07010b
at android.content.res.Resources.loadDrawable + 2096(Resources.java:2096)
What baffles me is that the app only uses PNG images. There isn't any reference to ic_keyboard_arrow_right_black_24dp.xml in the code, only to ic_keyboard_arrow_right_black_24dp.png. The error only happens in Android 4.
Does anyone have a clue about what may be causing the error?

Its likely a library loading it. Its probably trying to load the icon here: https://github.com/google/material-design-icons/blob/master/hardware/drawable-anydpi-v21/ic_keyboard_arrow_right_black_24dp.xml
If you don't want to find and fix the library, including that file in your build should fix it.

Related

"the file name must end with .xml" error for jpg file in Android Studio

I am getting this error while building my app. The drawable folder has the valid .jpg file and this is causing the error. How to bypass this? Also, I noticed that the path shown in the error is "main\res\routine\Routine.jpg", but there is no such folder in the project.
AGPBI: {"kind":"error","text":"The file name must end with .xml",
"sources":[{"file":"C:\\Users\\Lenovo\\AndroidStudioProjects\\project3\\app\\src\\main\\res\\routine\\Routine.JPG"}],
"tool":"Resource and asset merger"}```
UPDATE: solved the problem by reuploading the pic and saving it in drawable_V21. still dont know about that error message though. might be a bug
I guess that error you're experiencing is because of the file extension being in .JPG instead of .jpg try changing it. It may help somehow

Invalid color in Android Compilation. How to fix .9.png

I'm getting the following error when compiling in Android Studio
Android resource compilation failed
Output: error: found an invalid color.
The image that is causing the error is already a .9.png file and it looks like this in Android Studio
I am not sure how to solve this. I referred to this two questions
How can I track down the cause of Android "found an invalid color" error
Android : 9-Patch image Error
and both indicate that the border around the image should be transparent. I'm guessing I have to fix the "bad patches" shown in red. if that's the case how can I fix them and make the compilation succeed?

Run projects from androidviews

I am trying to run the sample project from customviews but facing some problems. i am not able to run any project from the site. Each time getting different type of error. I also searched in the net for the solution but failed to figure out the solution. May be i am facing a general problem for all projects and if i solve one i may be able to solve the others.
In ActionbarPullRequest library i am getting :
Description Resource Path Location Type SmoothProgressBar cannot be resolved to a type DefaultHeaderTransformer.java /library_ActionbarPulltoRefresh/src/uk/co/senab/actionbarpulltorefresh/library line
57 Java Problem
In StackBlurDemo i am getting this error :
Description Resource Path Location Type toggleButtonMode cannot be resolved or is not a field MainActivity.java /StackBlurDemo/src/com/example/stackblurdemo line 30 Java Problem

not able to read from resource in robolectric

I am trying to write robolectric test for android app. when i am trying to read the cofig, i am getting the following error.
Caused by: java.lang.IllegalArgumentException: Got resource name bool/config_enable from id 2131427329 (0x7f0b0001), but found no resource by that name
at com.xtremelabs.robolectric.res.BoolResourceLoader.getValue(BoolResourceLoader.java:27)
at com.xtremelabs.robolectric.res.ResourceLoader.getBooleanValue(ResourceLoader.java:462)
at com.xtremelabs.robolectric.shadows.ShadowResources.getBoolean(ShadowResources.java:193)
at android.content.res.Resources.getBoolean(Resources.java)
I'd say this is https://github.com/robolectric/robolectric/issues/346. Which version of Robolectric are you using? I guess this was only ever fixed in Robolectric 2...

jni problems when system load the .so file

I have already created .so file and put it in proper path.
However,when I try to run the android program the problem came by.
the problem is:
`5-16 15:34:16.704: E/AndroidRuntime(9968): Caused by: java.lang.UnsatisfiedLinkError:
Cannot load library: reloc_library[1311]: 1584 cannot locate '_Z13raptor_decodePKhtPKtPhjPK15RaptorParam_tag'...
raptor_decode is a function which included by the jni_function.`
what should i do to correct this problem? Thanks.
I think here is your problem:
1584 cannot locate '_Z13raptor_decodePKhtPKtPhjPK15RaptorParam_tag'
if raptor_decode is the method you want to call, read up here: http://java.sun.com/docs/books/jni/html/design.html (and read up 11.3)

Categories

Resources