FATAL EXCEPTION:android.content.res.Resources$NotFoundException

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
marra
Posts: 16
Joined: Mon Jul 23, 2018 3:32 pm

FATAL EXCEPTION:android.content.res.Resources$NotFoundException

Post by marra » Mon Jul 23, 2018 3:46 pm

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)

LiveCode_Panos
Livecode Staff Member
Livecode Staff Member
Posts: 818
Joined: Fri Feb 06, 2015 4:03 pm

Re: FATAL EXCEPTION:android.content.res.Resources$NotFoundException

Post by LiveCode_Panos » Mon Jul 23, 2018 10:31 pm

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
--

marra
Posts: 16
Joined: Mon Jul 23, 2018 3:32 pm

Re: FATAL EXCEPTION:android.content.res.Resources$NotFoundException

Post by marra » Tue Jul 24, 2018 8:07 am

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

LiveCode_Panos
Livecode Staff Member
Livecode Staff Member
Posts: 818
Joined: Fri Feb 06, 2015 4:03 pm

Re: FATAL EXCEPTION:android.content.res.Resources$NotFoundException

Post by LiveCode_Panos » Tue Jul 24, 2018 4:38 pm

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
--

marra
Posts: 16
Joined: Mon Jul 23, 2018 3:32 pm

Re: FATAL EXCEPTION:android.content.res.Resources$NotFoundException

Post by marra » Wed Jul 25, 2018 8:56 am

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

marra
Posts: 16
Joined: Mon Jul 23, 2018 3:32 pm

Re: FATAL EXCEPTION:android.content.res.Resources$NotFoundException

Post by marra » Sat Aug 04, 2018 3:19 pm

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

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7215
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: FATAL EXCEPTION:android.content.res.Resources$NotFoundException

Post by jacque » Sun Aug 05, 2018 6:01 pm

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?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

marra
Posts: 16
Joined: Mon Jul 23, 2018 3:32 pm

Re: FATAL EXCEPTION:android.content.res.Resources$NotFoundException

Post by marra » Sun Aug 05, 2018 6:42 pm

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

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7215
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: FATAL EXCEPTION:android.content.res.Resources$NotFoundException

Post by jacque » Sun Aug 05, 2018 7:49 pm

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

marra
Posts: 16
Joined: Mon Jul 23, 2018 3:32 pm

Re: FATAL EXCEPTION:android.content.res.Resources$NotFoundException

Post by marra » Mon Aug 06, 2018 9:52 am

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

Post Reply

Return to “Android Deployment”