3 Replies - 288 Views - Last Post: 25 June 2019 - 12:12 PM

#1 [email protected]   User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 175
  • Joined: 24-February 15

images not found(Android Studio)

Posted 25 June 2019 - 10:58 AM

Why I'm getting this errors while my pictures are located on the right map and I also can see them at the left side of the code, which means the editor can find them.

https://imgur.com/S5sS28A

loadDrawableForCookie(ResourcesImpl.java:839)
decodeImageDrawable(ResourcesImpl.java:766)
decodeDrawable(ImageDecoder.java:1645)
decodeDrawableImpl(ImageDecoder.java:1670)

Is This A Good Question/Topic? 0
  • +

Replies To: images not found(Android Studio)

#2 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 15260
  • View blog
  • Posts: 61,138
  • Joined: 12-June 08

Re: images not found(Android Studio)

Posted 25 June 2019 - 11:36 AM

What's the full error message?

.. and the relevant code/file structure setup.
Was This Post Helpful? 0
  • +
  • -

#3 [email protected]   User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 175
  • Joined: 24-February 15

Re: images not found(Android Studio)

Posted 25 June 2019 - 11:50 AM

File structure
https://imgur.com/a/psRKRPC

This is the full Logcat
    --------- beginning of crash
2019-06-25 20:32:00.684 3644-3644/com.izildo.android.navigationapp E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.izildo.android.navigationapp, PID: 3644
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.izildo.android.navigationapp/com.izildo.android.navigationapp.MainActivity}: android.view.InflateException: Binary XML file line #25: Binary XML file line #25: Error inflating class android.support.design.widget.NavigationView
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2913)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6669)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
     Caused by: android.view.InflateException: Binary XML file line #25: Binary XML file line #25: Error inflating class android.support.design.widget.NavigationView
     Caused by: android.view.InflateException: Binary XML file line #25: Error inflating class android.support.design.widget.NavigationView
     Caused by: java.lang.reflect.InvocationTargetException
        at java.lang.reflect.Constructor.newInstance0(Native Method)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
        at android.view.LayoutInflater.createView(LayoutInflater.java:647)
        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:790)
        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730)
        at android.view.LayoutInflater.rInflate(LayoutInflater.java:863)
        at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
        at android.support.v7.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:469)
        at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
        at com.izildo.android.navigationapp.MainActivity.onCreate(MainActivity.java:21)
        at android.app.Activity.performCreate(Activity.java:7136)
        at android.app.Activity.performCreate(Activity.java:7127)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6669)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
     Caused by: android.content.res.Resources$NotFoundException: Drawable com.izildo.android.navigationapp:mipmap/ic_person_black_24dp with resource ID #0x7f0d0002
     Caused by: android.content.res.Resources$NotFoundException: File res/mipmap-anydpi-v26/ic_person_black_24dp.png from drawable resource ID #0x7f0d0002
        at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:847)
2019-06-25 20:32:00.690 3644-3644/com.izildo.android.navigationapp E/AndroidRuntime:     at android.content.res.ResourcesImpl.loadDrawable(ResourcesImpl.java:631)
        at android.content.res.Resources.getDrawableForDensity(Resources.java:888)
        at android.content.res.Resources.getDrawable(Resources.java:827)
        at android.content.Context.getDrawable(Context.java:626)
        at android.support.v4.content.ContextCompat.getDrawable(ContextCompat.java:463)
        at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:203)
        at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:191)
        at android.support.v7.content.res.AppCompatResources.getDrawable(AppCompatResources.java:102)
        at android.support.v7.view.menu.MenuItemImpl.getIcon(MenuItemImpl.java:505)
        at android.support.design.internal.NavigationMenuPresenter$NavigationMenuAdapter.prepareMenuItems(NavigationMenuPresenter.java:532)
        at android.support.design.internal.NavigationMenuPresenter$NavigationMenuAdapter.update(NavigationMenuPresenter.java:473)
        at android.support.design.internal.NavigationMenuPresenter.updateMenuView(NavigationMenuPresenter.java:114)
        at android.support.design.widget.NavigationView.inflateMenu(NavigationView.java:266)
        at android.support.design.widget.NavigationView.<init>(NavigationView.java:189)
        at android.support.design.widget.NavigationView.<init>(NavigationView.java:104)
        at java.lang.reflect.Constructor.newInstance0(Native Method)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
        at android.view.LayoutInflater.createView(LayoutInflater.java:647)
        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:790)
        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730)
        at android.view.LayoutInflater.rInflate(LayoutInflater.java:863)
        at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
        at android.support.v7.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:469)
        at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
        at com.izildo.android.navigationapp.MainActivity.onCreate(MainActivity.java:21)
        at android.app.Activity.performCreate(Activity.java:7136)
        at android.app.Activity.performCreate(Activity.java:7127)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6669)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
     Caused by: java.lang.IllegalArgumentException: Dimensions must be positive! provided (0, 0)
        at android.graphics.ImageDecoder.setTargetSize(ImageDecoder.java:1033)
        at android.graphics.ImageDecoder.computeDensity(ImageDecoder.java:1823)
        at android.graphics.ImageDecoder.decodeDrawableImpl(ImageDecoder.java:1670)
        at android.graphics.ImageDecoder.decodeDrawable(ImageDecoder.java:1645)
        at android.content.res.ResourcesImpl.decodeImageDrawable(ResourcesImpl.java:766)
        at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:839)
        at android.content.res.ResourcesImpl.loadDrawable(ResourcesImpl.java:631) 
        at android.content.res.Resources.getDrawableForDensity(Resources.java:888) 
        at android.content.res.Resources.getDrawable(Resources.java:827) 
        at android.content.Context.getDrawable(Context.java:626) 
        at android.support.v4.content.ContextCompat.getDrawable(ContextCompat.java:463) 
        at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:203) 
        at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:191) 
        at android.support.v7.content.res.AppCompatResources.getDrawable(AppCompatResources.java:102) 
        at android.support.v7.view.menu.MenuItemImpl.getIcon(MenuItemImpl.java:505) 
        at android.support.design.internal.NavigationMenuPresenter$NavigationMenuAdapter.prepareMenuItems(NavigationMenuPresenter.java:532) 
        at android.support.design.internal.NavigationMenuPresenter$NavigationMenuAdapter.update(NavigationMenuPresenter.java:473) 
        at android.support.design.internal.NavigationMenuPresenter.updateMenuView(NavigationMenuPresenter.java:114) 
        at android.support.design.widget.NavigationView.inflateMenu(NavigationView.java:266) 
        at android.support.design.widget.NavigationView.<init>(NavigationView.java:189) 
        at android.support.design.widget.NavigationView.<init>(NavigationView.java:104) 
        at java.lang.reflect.Constructor.newInstance0(Native Method) 
        at java.lang.reflect.Constructor.newInstance(Constructor.java:343) 
        at android.view.LayoutInflater.createView(LayoutInflater.java:647) 
        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:790) 
        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730) 
        at android.view.LayoutInflater.rInflate(LayoutInflater.java:863) 
        at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824) 
        at android.view.LayoutInflater.inflate(LayoutInflater.java:515) 
        at android.view.LayoutInflater.inflate(LayoutInflater.java:423) 
        at android.view.LayoutInflater.inflate(LayoutInflater.java:374) 
        at android.support.v7.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:469) 
        at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140) 
        at com.izildo.android.navigationapp.MainActivity.onCreate(MainActivity.java:21) 
        at android.app.Activity.performCreate(Activity.java:7136) 
        at android.app.Activity.performCreate(Activity.java:7127) 
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271) 
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893) 
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048) 
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) 
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) 
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808) 
        at android.os.Handler.dispatchMessage(Handler.java:106) 
        at android.os.Looper.loop(Looper.java:193) 
        at android.app.ActivityThread.main(ActivityThread.java:6669) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) 
2019-06-25 20:32:00.722 3644-3644/com.izildo.android.navigationapp I/Process: Sending signal. PID: 3644 SIG: 9



Was This Post Helpful? 0
  • +
  • -

#4 [email protected]   User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 175
  • Joined: 24-February 15

Re: images not found(Android Studio)

Posted 25 June 2019 - 12:12 PM

Oh, I fixed it, I had to put the icons in the drawable to.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1