java.lang.RuntimeException: Unable to start activity ComponentInfo{b4a.example3/b4a.example3.main}: android.content.res.Resources$NotFoundException: Resource ID #0x7f030002
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2984)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3045)
at android.app.ActivityThread.-wrap14(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1642)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6776)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)
Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f030002
at android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:202)
at android.content.res.Resources.getDrawable(Resources.java:1641)
at android.content.Context.getDrawable(Context.java:525)
at com.android.internal.widget.ToolbarWidgetWrapper.setIcon(ToolbarWidgetWrapper.java:352)
at com.android.internal.widget.ActionBarOverlayLayout.setIcon(ActionBarOverlayLayout.java:737)
at com.android.internal.policy.PhoneWindow.setDefaultIcon(PhoneWindow.java:1817)
at android.app.Activity.initWindowDecorActionBar(Activity.java:2534)
at android.app.Activity.setContentView(Activity.java:2569)
at b4a.example3.main.onCreate(main.java:59)
at android.app.Activity.performCreate(Activity.java:6955)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1126)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2927)
... 9 more
--------- beginning of main
--------- beginning of crash
java.lang.RuntimeException: Unable to start activity ComponentInfo{b4a.example3/b4a.example3.main}: android.content.res.Resources$NotFoundException: Drawable b4a.example3:mipmap/ic_launcher with resource ID #0x7f030002
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2831)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2906)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1605)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:172)
at android.app.ActivityThread.main(ActivityThread.java:6637)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Caused by: android.content.res.Resources$NotFoundException: Drawable b4a.example3:mipmap/ic_launcher with resource ID #0x7f030002
Caused by: android.content.res.Resources$NotFoundException: File res/mipmap-anydpi-v21/ic_launcher.xml from drawable resource ID #0x7f030002
at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:768)
at android.content.res.ResourcesImpl.loadDrawable(ResourcesImpl.java:600)
at android.content.res.Resources.getDrawableForDensity(Resources.java:876)
at android.content.res.Resources.getDrawable(Resources.java:818)
at android.content.Context.getDrawable(Context.java:605)
at com.android.internal.widget.ToolbarWidgetWrapper.setIcon(ToolbarWidgetWrapper.java:322)
at com.android.internal.widget.ActionBarOverlayLayout.setIcon(ActionBarOverlayLayout.java:742)
at com.android.internal.policy.PhoneWindow.setDefaultIcon(PhoneWindow.java:1755)
at android.app.Activity.initWindowDecorActionBar(Activity.java:2640)
at android.app.Activity.setContentView(Activity.java:2675)
at b4a.example3.main.onCreate(main.java:59)
at android.app.Activity.performCreate(Activity.java:6975)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2784)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2906)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1605)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:172)
at android.app.ActivityThread.main(ActivityThread.java:6637)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Caused by: android.content.res.Resources$NotFoundException: File res/mipmap-anydpi-v21/ic_launcher.xml from xml type drawable resource ID #0x7f030002
at android.content.res.ResourcesImpl.loadXmlResourceParser(ResourcesImpl.java:1080)
at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:756)
... 22 more
Caused by: java.io.FileNotFoundException: Corrupt XML binary file
at android.content.res.AssetManager.openXmlAssetNative(Native Method)
at android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java:546)
at android.content.res.ResourcesImpl.loadXmlResourceParser(ResourcesImpl.java:1065)
... 23 more
Are you running this on Android 8?
Have you used B4A Sdk Manager to install all the updated components?
Logger connected to: LGE Nexus 5X
--------- beginning of main
--------- beginning of crash
java.lang.RuntimeException: Unable to start activity ComponentInfo{b4a.example/b4a.example.main}: android.content.res.Resources$NotFoundException: Drawable b4a.example:mipmap/ic_launcher with resource ID #0x7f030002
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2778)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by: android.content.res.Resources$NotFoundException: Drawable b4a.example:mipmap/ic_launcher with resource ID #0x7f030002
Caused by: android.content.res.Resources$NotFoundException: File res/mipmap-anydpi-v21/ic_launcher.xml from drawable resource ID #0x7f030002
at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:820)
at android.content.res.ResourcesImpl.loadDrawable(ResourcesImpl.java:630)
at android.content.res.Resources.getDrawableForDensity(Resources.java:877)
at android.content.res.Resources.getDrawable(Resources.java:819)
at android.content.Context.getDrawable(Context.java:605)
at com.android.internal.widget.ToolbarWidgetWrapper.setIcon(ToolbarWidgetWrapper.java:322)
at com.android.internal.widget.ActionBarOverlayLayout.setIcon(ActionBarOverlayLayout.java:742)
at com.android.internal.policy.PhoneWindow.setDefaultIcon(PhoneWindow.java:1756)
at android.app.Activity.initWindowDecorActionBar(Activity.java:2655)
at android.app.Activity.setContentView(Activity.java:2690)
at b4a.example.main.onCreate(main.java:59)
at android.app.Activity.performCreate(Activity.java:6999)
at android.app.Activity.performCreate(Activity.java:6990)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by: android.content.res.Resources$NotFoundException: File res/mipmap-anydpi-v21/ic_launcher.xml from xml type drawable resource ID #0x7f030002
at android.content.res.ResourcesImpl.loadXmlResourceParser(ResourcesImpl.java:1163)
at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:805)
... 23 more
Caused by: java.io.FileNotFoundException: Corrupt XML binary file
at android.content.res.AssetManager.openXmlAssetNative(Native Method)
at android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java:546)
at android.content.res.ResourcesImpl.loadXmlResourceParser(ResourcesImpl.java:1148)
... 24 more
java.lang.RuntimeException: Unable to start activity ComponentInfo{b4a.example/b4a.example.main}: android.content.res.Resources$NotFoundException: Drawable b4a.example:mipmap/ic_launcher with resource ID #0x7f030002
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2778)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by: android.content.res.Resources$NotFoundException: Drawable b4a.example:mipmap/ic_launcher with resource ID #0x7f030002
Caused by: android.content.res.Resources$NotFoundException: File res/mipmap/ic_launcher.xml from drawable resource ID #0x7f030002
at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:820)
at android.content.res.ResourcesImpl.loadDrawable(ResourcesImpl.java:630)
at android.content.res.Resources.getDrawableForDensity(Resources.java:877)
at android.content.res.Resources.getDrawable(Resources.java:819)
at android.content.Context.getDrawable(Context.java:605)
at com.android.internal.widget.ToolbarWidgetWrapper.setIcon(ToolbarWidgetWrapper.java:322)
at com.android.internal.widget.ActionBarOverlayLayout.setIcon(ActionBarOverlayLayout.java:742)
at com.android.internal.policy.PhoneWindow.setDefaultIcon(PhoneWindow.java:1756)
at android.app.Activity.initWindowDecorActionBar(Activity.java:2655)
at android.app.Activity.setContentView(Activity.java:2690)
at b4a.example.main.onCreate(main.java:59)
at android.app.Activity.performCreate(Activity.java:6999)
at android.app.Activity.performCreate(Activity.java:6990)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by: android.content.res.Resources$NotFoundException: File res/mipmap/ic_launcher.xml from xml type drawable resource ID #0x7f030002
at android.content.res.ResourcesImpl.loadXmlResourceParser(ResourcesImpl.java:1163)
at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:805)
... 23 more
Caused by: java.io.FileNotFoundException: Corrupt XML binary file
at android.content.res.AssetManager.openXmlAssetNative(Native Method)
at android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java:546)
at android.content.res.ResourcesImpl.loadXmlResourceParser(ResourcesImpl.java:1148)
... 24 more
java.lang.RuntimeException: Unable to start activity ComponentInfo{b4a.example/b4a.example.main}: android.content.res.Resources$NotFoundException: Drawable b4a.example:mipmap/ic_launcher with resource ID #0x7f030002
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2778)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by: android.content.res.Resources$NotFoundException: Drawable b4a.example:mipmap/ic_launcher with resource ID #0x7f030002
Caused by: android.content.res.Resources$NotFoundException: File res/mipmap/ic_launcher.xml from drawable resource ID #0x7f030002
at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:820)
at android.content.res.ResourcesImpl.loadDrawable(ResourcesImpl.java:630)
at android.content.res.Resources.getDrawableForDensity(Resources.java:877)
at android.content.res.Resources.getDrawable(Resources.java:819)
at android.content.Context.getDrawable(Context.java:605)
at com.android.internal.widget.ToolbarWidgetWrapper.setIcon(ToolbarWidgetWrapper.java:322)
at com.android.internal.widget.ActionBarOverlayLayout.setIcon(ActionBarOverlayLayout.java:742)
at com.android.internal.policy.PhoneWindow.setDefaultIcon(PhoneWindow.java:1756)
at android.app.Activity.initWindowDecorActionBar(Activity.java:2655)
at android.app.Activity.setContentView(Activity.java:2690)
at b4a.example.main.onCreate(main.java:59)
at android.app.Activity.performCreate(Activity.java:6999)
at android.app.Activity.performCreate(Activity.java:6990)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by: android.content.res.Resources$NotFoundException: File res/mipmap/ic_launcher.xml from xml type drawable resource ID #0x7f030002
at android.content.res.ResourcesImpl.loadXmlResourceParser(ResourcesImpl.java:1163)
at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:805)
... 23 more
Caused by: java.io.FileNotFoundException: Corrupt XML binary file
at android.content.res.AssetManager.openXmlAssetNative(Native Method)
at android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java:546)
at android.content.res.ResourcesImpl.loadXmlResourceParser(ResourcesImpl.java:1148)
... 24 more
Tried to run the same example Erel posted in #2Upload a example project which shoes the issue
Tried to run the same example Erel posted in #2
Don't forget to set the two images files to be read-only.
Yes. Even after setting them as read-only, the error occurs... Have you tried to run it?You did consider the notes?
Make sure to set the IDE to use the new SDK.I used B4A SDK manager to update ALL recommended component. BUT... same result =_=!
I've tried the attached example and it does work here.
Make sure to set the IDE to use the new SDK.
It will not work if you are using older versions of Android SDK.
Are you using B4A Sdk Manager?
Logger verbunden mit: PLEGAR1771405847
--------- beginning of crash
--------- beginning of system
--------- beginning of main
java.lang.RuntimeException: Unable to start activity ComponentInfo{b4a.example3/b4a.example3.main}: android.content.res.Resources$NotFoundException: Drawable b4a.example3:mipmap/ic_launcher with resource ID #0x7f030002
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2778)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6501)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by: android.content.res.Resources$NotFoundException: Drawable b4a.example3:mipmap/ic_launcher with resource ID #0x7f030002
Caused by: android.content.res.Resources$NotFoundException: File res/mipmap-anydpi-v21/ic_launcher.xml from drawable resource ID #0x7f030002
at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:820)
at android.content.res.ResourcesImpl.loadDrawable(ResourcesImpl.java:630)
at android.content.res.Resources.getDrawableForDensity(Resources.java:877)
at android.content.res.Resources.getDrawable(Resources.java:819)
at android.content.Context.getDrawable(Context.java:605)
at com.android.internal.widget.ToolbarWidgetWrapper.setIcon(ToolbarWidgetWrapper.java:322)
at com.android.internal.widget.ActionBarOverlayLayout.setIcon(ActionBarOverlayLayout.java:742)
at com.android.internal.policy.PhoneWindow.setDefaultIcon(PhoneWindow.java:1766)
at android.app.Activity.initWindowDecorActionBar(Activity.java:2668)
at android.app.Activity.setContentView(Activity.java:2703)
at b4a.example3.main.onCreate(main.java:61)
at android.app.Activity.performCreate(Activity.java:7026)
at android.app.Activity.performCreate(Activity.java:7017)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1215)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6501)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by: android.content.res.Resources$NotFoundException: File res/mipmap-anydpi-v21/ic_launcher.xml from xml type drawable resource ID #0x7f030002
at android.content.res.ResourcesImpl.loadXmlResourceParser(ResourcesImpl.java:1163)
at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:805)
... 23 more
Caused by: java.io.FileNotFoundException: Corrupt XML binary file
at android.content.res.AssetManager.openXmlAssetNative(Native Method)
at android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java:546)
at android.content.res.ResourcesImpl.loadXmlResourceParser(ResourcesImpl.java:1148)
... 24 more