-4

hello guys i am new in android studio and i made an app that redial automatically when the call is is busy after writing my code the app crushed and i don't know the reason and nothing seems wrong

and this is my logcat

09-20 22:14:58.236 20194-20194/com.fm360.autoredilaapp E/AndroidRuntime: FATAL EXCEPTION: main
                                                                     Process: com.fm360.autoredilaapp, PID: 20194
                                                                     android.content.res.Resources$NotFoundException: Resource ID #0x7f0e0000
                                                                         at android.content.res.Resources.getValue(Resources.java:1351)
                                                                         at android.content.res.Resources.loadXmlResourceParser(Resources.java:2774)
                                                                         at android.content.res.Resources.getLayout(Resources.java:1165)
                                                                         at android.view.LayoutInflater.inflate(LayoutInflater.java:421)
                                                                         at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:378)
                                                                         at android.widget.ArrayAdapter.getView(ArrayAdapter.java:369)
                                                                         at android.widget.Spinner.makeView(Spinner.java:690)
                                                                         at android.widget.Spinner.layout(Spinner.java:638)
                                                                         at android.widget.Spinner.onLayout(Spinner.java:600)
                                                                         at android.view.View.layout(View.java:16630)
                                                                         at android.view.ViewGroup.layout(ViewGroup.java:5437)
                                                                         at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1743)
                                                                         at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1586)
                                                                         at android.widget.LinearLayout.onLayout(LinearLayout.java:1495)
                                                                         at android.view.View.layout(View.java:16630)
                                                                         at android.view.ViewGroup.layout(ViewGroup.java:5437)
                                                                         at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336)
                                                                         at android.widget.FrameLayout.onLayout(FrameLayout.java:273)
                                                                         at android.widget.ScrollView.onLayout(ScrollView.java:1525)
                                                                         at android.view.View.layout(View.java:16630)
                                                                         at android.view.ViewGroup.layout(ViewGroup.java:5437)
                                                                         at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336)
                                                                         at android.widget.FrameLayout.onLayout(FrameLayout.java:273)
                                                                         at android.view.View.layout(View.java:16630)
                                                                         at android.view.ViewGroup.layout(ViewGroup.java:5437)
                                                                         at android.support.v7.widget.ActionBarOverlayLayout.onLayout(ActionBarOverlayLayout.java:437)
                                                                         at android.view.View.layout(View.java:16630)
                                                                         at android.view.ViewGroup.layout(ViewGroup.java:5437)
                                                                         at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336)
                                                                         at android.widget.FrameLayout.onLayout(FrameLayout.java:273)
                                                                         at android.view.View.layout(View.java:16630)
                                                                         at android.view.ViewGroup.layout(ViewGroup.java:5437)
                                                                         at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1743)
                                                                         at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1586)
                                                                         at android.widget.LinearLayout.onLayout(LinearLayout.java:1495)
                                                                         at android.view.View.layout(View.java:16630)
                                                                         at android.view.ViewGroup.layout(ViewGroup.java:5437)
                                                                         at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336)
                                                                         at android.widget.FrameLayout.onLayout(FrameLayout.java:273)
                                                                         at com.android.internal.policy.PhoneWindow$DecorView.onLayout(PhoneWindow.java:2678)
                                                                         at android.view.View.layout(View.java:16630)
                                                                         at android.view.ViewGroup.layout(ViewGroup.java:5437)
                                                                         at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2171)
                                                                         at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1931)
                                                                         at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1107)
                                                                         at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6013)
                                                                         at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858)
                                                                         at android.view.Choreographer.doCallbacks(Choreographer.java:670)
                                                                         at android.view.Choreographer.doFrame(Choreographer.java:606)
                                                                         at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
                                                                         at android.os.Handler.handleCallback(Handler.java:739)
                                                                         at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                         at android.os.Looper.loop(Looper.java:148)
                                                                         at android.app.ActivityThread.main(ActivityThread.java:5417)
                                                                         at java.lang.reflect.Method.invoke(Native Method)
                                                                         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
                                                                         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

09-20 22:14:59.337 20194-20201/com.fm360.autoredilaapp W/art: Suspending all threads took: 47.386ms 09-20 22:15:58.947 20194-20201/com.fm360.autoredilaapp W/art: Suspending all threads took: 5.250ms 09-20 22:18:27.053 20194-20201/com.fm360.autoredilaapp W/art: Suspending all threads took: 8.646ms 09-20 22:19:58.608 20194-20194/? I/Process: Sending signal. PID: 20194 SIG: 9

hybrid
  • 1,255
  • 2
  • 17
  • 42
Fahd Mana
  • 11
  • 4

2 Answers2

1

This can often happen when you are using resources that are directly from android.R.drawables directory that are not available in the OS of which you are launching on.

Another common cause is if you are using SVG graphics or Vector Drawables and trying to reference from KitKat or earlier as it may have issues accessing it depending on your folder structure.

For example if you put it in a no-dpi folder for SVG graphics, that folder will not be included in your KitKat builds so just ensure that you are not putting resources in a directory that is not added to your OS specific target build and min targets and make sure that you are not referencing android resources unless you copy them into your project res/drawable directories manually.

Also, I would ask if your preview shows up properly on the UI as that can indicate using a theme or style that doesn't properly support the spinner and maybe missing the necessary dependencies for support libraries for example. So just double check that as well.

Sam
  • 5,342
  • 1
  • 23
  • 39
  • Yes. The preview shows up properly. Nothing seems wrong – Fahd Mana Sep 21 '17 at 17:55
  • so are you using Vector Graphics? Are you using folders like nodpi? Are you using android.R.drawable graphics? I'm trying to help you but need more info then it looks fine lol. – Sam Sep 21 '17 at 17:56
0

The error shows that you are referring to the Id of a resource which is not defined in your layouts.

If you are sure you are doing it correctly, try doing a clean build.

Otherwise you can view your generated R.java at Where gen/R.java should be created in Android Studio project? and check the resource matching to #0x7f0e0000

hybrid
  • 1,255
  • 2
  • 17
  • 42
  • i have tried to do clean build but it still not working... – Fahd Mana Sep 20 '17 at 22:56
  • and i locate the resource #0x7f0e0000 i found it in R.file – Fahd Mana Sep 20 '17 at 22:57
  • i found this public static final int attempts=0x7f0e0000; – Fahd Mana Sep 20 '17 at 22:57
  • The error is in a Spinner which you have used or inside an ArrayAdapter. Double check the resources used there. – hybrid Sep 20 '17 at 23:07
  • You can refer this for more ideas. https://stackoverflow.com/questions/15262261/android-content-res-resourcesnotfoundexception-unable-to-find-resource-id-0xf . This question was asked many times on StackOverflow already. – hybrid Sep 20 '17 at 23:11