FATAL EXCEPTION:android.content.res.Resources$NotFoundException
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
FATAL EXCEPTION:android.content.res.Resources$NotFoundException
Hi,
I am a beginner with LiveCode (9 days). However having a problem testing a app on Android. I tested on the Emulator, Phone and Tablet, and get the same issue on each, even tried it with the Hello World example. I first want to make sure that everything works before is start working more on my app as part of my evaluation of LiveCode. I have tried a number of things and research the issue however cannot resolve the issue. Each time is test the app on a device I get the error "Unfortunately xxxxx has Stopped". Any help or guidance is appreciated. This is what I have:
Windows 10 64 Bit
LiveCode Indy 9.0.0
Java 8
Android Studio
Below the extract from the Android device log:
07-23 15:57:51.732: E/AndroidRuntime(12226): FATAL EXCEPTION: main
07-23 15:57:51.732: E/AndroidRuntime(12226): Process: com.yourcompany.yourapp, PID: 12226
07-23 15:57:51.732: E/AndroidRuntime(12226): android.content.res.Resources$NotFoundException: Resource ID #0x0
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.content.res.Resources.getValue(Resources.java:1123)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.content.res.Resources.getDrawable(Resources.java:698)
07-23 15:57:51.732: E/AndroidRuntime(12226): at com.runrev.android.BitmapView.drawSplashScreen(BitmapView.java:165)
07-23 15:57:51.732: E/AndroidRuntime(12226): at com.runrev.android.BitmapView.onDraw(BitmapView.java:72)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.View.draw(View.java:14473)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.View.draw(View.java:14358)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.ViewGroup.drawChild(ViewGroup.java:3103)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2940)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.View.draw(View.java:14356)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.ViewGroup.drawChild(ViewGroup.java:3103)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2940)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.View.draw(View.java:14356)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.ViewGroup.drawChild(ViewGroup.java:3103)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2940)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.View.draw(View.java:14356)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.ViewGroup.drawChild(ViewGroup.java:3103)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2940)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.View.draw(View.java:14476)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.widget.FrameLayout.draw(FrameLayout.java:472)
07-23 15:57:51.732: E/AndroidRuntime(12226): at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2326)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.ViewRootImpl.drawSoftware(ViewRootImpl.java:2496)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.ViewRootImpl.draw(ViewRootImpl.java:2409)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2253)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1883)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1000)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5670)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.Choreographer.doCallbacks(Choreographer.java:574)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.Choreographer.doFrame(Choreographer.java:544)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.os.Handler.handleCallback(Handler.java:733)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.os.Handler.dispatchMessage(Handler.java:95)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.os.Looper.loop(Looper.java:136)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.app.ActivityThread.main(ActivityThread.java:5017)
07-23 15:57:51.732: E/AndroidRuntime(12226): at java.lang.reflect.Method.invokeNative(Native Method)
07-23 15:57:51.732: E/AndroidRuntime(12226): at java.lang.reflect.Method.invoke(Method.java:515)
07-23 15:57:51.732: E/AndroidRuntime(12226): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
07-23 15:57:51.732: E/AndroidRuntime(12226): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
07-23 15:57:51.732: E/AndroidRuntime(12226): at dalvik.system.NativeStart.main(Native Method)
I am a beginner with LiveCode (9 days). However having a problem testing a app on Android. I tested on the Emulator, Phone and Tablet, and get the same issue on each, even tried it with the Hello World example. I first want to make sure that everything works before is start working more on my app as part of my evaluation of LiveCode. I have tried a number of things and research the issue however cannot resolve the issue. Each time is test the app on a device I get the error "Unfortunately xxxxx has Stopped". Any help or guidance is appreciated. This is what I have:
Windows 10 64 Bit
LiveCode Indy 9.0.0
Java 8
Android Studio
Below the extract from the Android device log:
07-23 15:57:51.732: E/AndroidRuntime(12226): FATAL EXCEPTION: main
07-23 15:57:51.732: E/AndroidRuntime(12226): Process: com.yourcompany.yourapp, PID: 12226
07-23 15:57:51.732: E/AndroidRuntime(12226): android.content.res.Resources$NotFoundException: Resource ID #0x0
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.content.res.Resources.getValue(Resources.java:1123)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.content.res.Resources.getDrawable(Resources.java:698)
07-23 15:57:51.732: E/AndroidRuntime(12226): at com.runrev.android.BitmapView.drawSplashScreen(BitmapView.java:165)
07-23 15:57:51.732: E/AndroidRuntime(12226): at com.runrev.android.BitmapView.onDraw(BitmapView.java:72)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.View.draw(View.java:14473)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.View.draw(View.java:14358)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.ViewGroup.drawChild(ViewGroup.java:3103)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2940)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.View.draw(View.java:14356)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.ViewGroup.drawChild(ViewGroup.java:3103)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2940)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.View.draw(View.java:14356)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.ViewGroup.drawChild(ViewGroup.java:3103)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2940)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.View.draw(View.java:14356)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.ViewGroup.drawChild(ViewGroup.java:3103)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2940)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.View.draw(View.java:14476)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.widget.FrameLayout.draw(FrameLayout.java:472)
07-23 15:57:51.732: E/AndroidRuntime(12226): at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2326)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.ViewRootImpl.drawSoftware(ViewRootImpl.java:2496)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.ViewRootImpl.draw(ViewRootImpl.java:2409)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2253)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1883)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1000)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5670)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.Choreographer.doCallbacks(Choreographer.java:574)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.Choreographer.doFrame(Choreographer.java:544)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.os.Handler.handleCallback(Handler.java:733)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.os.Handler.dispatchMessage(Handler.java:95)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.os.Looper.loop(Looper.java:136)
07-23 15:57:51.732: E/AndroidRuntime(12226): at android.app.ActivityThread.main(ActivityThread.java:5017)
07-23 15:57:51.732: E/AndroidRuntime(12226): at java.lang.reflect.Method.invokeNative(Native Method)
07-23 15:57:51.732: E/AndroidRuntime(12226): at java.lang.reflect.Method.invoke(Method.java:515)
07-23 15:57:51.732: E/AndroidRuntime(12226): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
07-23 15:57:51.732: E/AndroidRuntime(12226): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
07-23 15:57:51.732: E/AndroidRuntime(12226): at dalvik.system.NativeStart.main(Native Method)
-
- Livecode Staff Member
- Posts: 818
- Joined: Fri Feb 06, 2015 4:03 pm
Re: FATAL EXCEPTION:android.content.res.Resources$NotFoundException
Hello marra,
Welcome to LiveCode.
It looks like the app is crashing on startup. Does the device by any chance run Android 6? We had some issues with Android 6 devices.
Moreover, do you see this crash in *any* livecode app your tried, or with just a specific one?
Best regards,
Panos
--
Welcome to LiveCode.
It looks like the app is crashing on startup. Does the device by any chance run Android 6? We had some issues with Android 6 devices.
Moreover, do you see this crash in *any* livecode app your tried, or with just a specific one?
Best regards,
Panos
--
Re: FATAL EXCEPTION:android.content.res.Resources$NotFoundException
Hi Panos,
Thx for the warm welcome. You are correct, in that the app crashes at startup. I have tried it on two physical devices Android 4.4.2 (Tablet) and 6.0 (phone) and it happens on both. The app also crash on the emulator I am running 4.0.3 (with Google API). I have tried with different 'apps' as to eliminate that possibility, as well as the 'Hello World' app from one of the lessons. If what you are saying about 6.0, is correct, then it seems there might be an issue with 4.2.2 as well?
Regards
Marra
Thx for the warm welcome. You are correct, in that the app crashes at startup. I have tried it on two physical devices Android 4.4.2 (Tablet) and 6.0 (phone) and it happens on both. The app also crash on the emulator I am running 4.0.3 (with Google API). I have tried with different 'apps' as to eliminate that possibility, as well as the 'Hello World' app from one of the lessons. If what you are saying about 6.0, is correct, then it seems there might be an issue with 4.2.2 as well?
Regards
Marra
-
- Livecode Staff Member
- Posts: 818
- Joined: Fri Feb 06, 2015 4:03 pm
Re: FATAL EXCEPTION:android.content.res.Resources$NotFoundException
Hello marra,
If you see the crash with every app and on both Android 6 and 4.4.2, then this is a different bug that the one I had on mind.
How do you install the app in the device? Do you use the Test button of the LiveCode IDE?
Best,
Panos
--
If you see the crash with every app and on both Android 6 and 4.4.2, then this is a different bug that the one I had on mind.
How do you install the app in the device? Do you use the Test button of the LiveCode IDE?
Best,
Panos
--
Re: FATAL EXCEPTION:android.content.res.Resources$NotFoundException
Hi Panos,
Correct, I am using the Test button on the LiveCode IDE. This was the case for both the simulator and the physical devices connect via USB. Both the physical devices' Developer Mode are active.
Regards
Marra
Correct, I am using the Test button on the LiveCode IDE. This was the case for both the simulator and the physical devices connect via USB. Both the physical devices' Developer Mode are active.
Regards
Marra
Re: FATAL EXCEPTION:android.content.res.Resources$NotFoundException
Okay,
Still having a problem with this, it seems unresolvable at the moment. So I guess I will need to look at another IDE. BTW tried the Community Version 9.0 and this does not even start after the install. The splash screen starts indicating loading libraries and then it just dies, no Error or Warning in any of the Windows event logs. Certainly not fun, as I really want to get going with development, but having to work so hard just to get the environment ready....
Regards
Marra
Still having a problem with this, it seems unresolvable at the moment. So I guess I will need to look at another IDE. BTW tried the Community Version 9.0 and this does not even start after the install. The splash screen starts indicating loading libraries and then it just dies, no Error or Warning in any of the Windows event logs. Certainly not fun, as I really want to get going with development, but having to work so hard just to get the environment ready....
Regards
Marra
-
- VIP Livecode Opensource Backer
- Posts: 7237
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: FATAL EXCEPTION:android.content.res.Resources$NotFoundException
Try deleting the LiveCode preferences file here:
./Users/YourName/AppData/Roaming/RunRev/preferences
That may allow the community edition to launch.
Since the original error relates to Android resources, I wonder if you have installed all the required files. You need the build tools and the files for Android 4.0.3. You can also include other Android version files if you want, but LC requires 4.0.3 to always be installed.
Are you using Studio or just the command line tools?
./Users/YourName/AppData/Roaming/RunRev/preferences
That may allow the community edition to launch.
Since the original error relates to Android resources, I wonder if you have installed all the required files. You need the build tools and the files for Android 4.0.3. You can also include other Android version files if you want, but LC requires 4.0.3 to always be installed.
Are you using Studio or just the command line tools?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: FATAL EXCEPTION:android.content.res.Resources$NotFoundException
Hi Jacque,
Thank you! that sorted the Community version issue, it is now up and running.
Re the android resources, is that I did install all the required files and build tools for 4.0.3 and also included later Android versions.
I am using Studio. I will now try and see if I get the same FATAL Exception issue with the Community version. I will report back.
Regards
Marra
Thank you! that sorted the Community version issue, it is now up and running.
Re the android resources, is that I did install all the required files and build tools for 4.0.3 and also included later Android versions.
I am using Studio. I will now try and see if I get the same FATAL Exception issue with the Community version. I will report back.
Regards
Marra
-
- VIP Livecode Opensource Backer
- Posts: 7237
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: FATAL EXCEPTION:android.content.res.Resources$NotFoundException
There was a warning somewhere that LC didn't work with the latest build tools. If you still get the error, try installing the previous version of the tools.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: FATAL EXCEPTION:android.content.res.Resources$NotFoundException
Hi Jacque,
Thank you for your help. I now have Community version running and I am also able to test on an Android device. I kept the previous version of Java and Android SDK in place and used it with Community version, so now on to working with the IDE and start with coding, now that I can test and that my environment is set-up correctly.
Although the root cause of the original error was not resolved yet, I am able to move forward for now.
Regards
Marra
Thank you for your help. I now have Community version running and I am also able to test on an Android device. I kept the previous version of Java and Android SDK in place and used it with Community version, so now on to working with the IDE and start with coding, now that I can test and that my environment is set-up correctly.
Although the root cause of the original error was not resolved yet, I am able to move forward for now.
Regards
Marra