Android Question Fatal Exception: android.content.res.Resources$NotFoundException

D

Deleted member 103

Guest
Hi Guys,

the procedure "SetNinePatchDrawable" causes the error below.
Should I exchange this procedure with something else, or should I not pay attention to the error, since anyway it affects only one device?

B4X:
Public Sub SetNinePatchDrawable(Control As View, ImageName As String)
    Dim r As Reflector
    Dim package As String
    Dim id As Int
    package = r.GetStaticField("anywheresoftware.b4a.BA", "packageName")
    id = r.GetStaticField(package & ".R$drawable", ImageName)
    r.Target = r.GetContext
    r.Target = r.RunMethod("getResources")
    Control.Background = r.RunMethod2("getDrawable", id, "java.lang.int")
End Sub

Firebase-Crashlytics:
Fatal Exception: android.content.res.Resources$NotFoundException: Resource ID #0x12d80128
at android.content.res.ResourcesImpl.getValueForDensity(ResourcesImpl.java:229)
at android.content.res.Resources.getDrawableForDensity(Resources.java:876)
at android.content.res.Resources.getDrawable(Resources.java:819)
at android.content.res.Resources.getDrawable(Resources.java:794)
at java.lang.reflect.Method.invoke(Method.java)
at anywheresoftware.b4a.agraham.reflection.Reflection.runmethod(Reflection.java:216)
at anywheresoftware.b4a.agraham.reflection.Reflection.RunMethod2(Reflection.java:817)
at fg.MasterOfRegolarity.mbbl._vvvvvvvvvvvvvvvvvvv3(mbbl.java:1962)
at fg.MasterOfRegolarity.main._activity_create(main.java:467)
at java.lang.reflect.Method.invoke(Method.java)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
at fg.MasterOfRegolarity.main.afterFirstLayout(main.java:104)
at fg.MasterOfRegolarity.main.access$000(main.java:17)
at fg.MasterOfRegolarity.main$WaitForLayout.run(main.java:82)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6523)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:857)

Gerät
Marke: joyar
Modell: XZPAD412LTE
Ausrichtung: Hochformat
Freier RAM: 897.51 MB
Freier Festplattenspeicher: 9.35 GB

Betriebssystem
Version: 8.1.0
Ausrichtung: Hochformat
Rooting durchgeführt: Nein

Absturz
Datum: 06.03.2019, 22:08:00
App-Version: 2.15 (32)

at fg.MasterOfRegolarity.mbbl._vvvvvvvvvvvvvvvvvvv3(mbbl.java:1962):
1961: //BA.debugLineNum = 378;BA.debugLine="Control.Background = r.RunMethod2(\"getDrawable";
_control.setBackground((android.graphics.drawable.Drawable)
1962: (_r.RunMethod2("getDrawable",BA.NumberToString(_id),"java.lang.int")));
//BA.debugLineNum = 379;BA.debugLine="End Sub";
1963: return "";
}
 
D

Deleted member 103

Guest
How are the resources organized?
It's all under "...\Objects\res\drawable".

Just now, the customer contacted me and said that the app does not offer the horizontal orientation.
But that only happens because the device outputs the wrong display size.
Maybe everything has to do with the same problem. :(

The device is: Hamlet Zelig 412 LTE
 
Upvote 0
D

Deleted member 103

Guest
These resources should be available to all devices. Not sure why it failed.
I think that's a weird tablet, it's too cheap and you can not expect much.:D

Due to the display size problem, I have sent the customer a small app for a test, the app only shows the display size.
Let's see if we can fix this problem at least. :)
 
Upvote 0
D

Deleted member 103

Guest
Due to the display size problem, I have sent the customer a small app for a test, the app only shows the display size.
Let's see if we can fix this problem at least. :)
Just for info!
My customer has tested my test-app, it shows a display size of 4.63" inches, and that should be a tablet with 10.1" inch display?
That's a cheap stuff, he writes he throws it away. :p
 
Upvote 0
Top