0

I'm writing ICS+ app and it works fine on Nexus S, Nexus Galaxy, Nexus 7, Galaxy Tab, Galaxy S3 and bunch of other devices. Yesterday I got Nexus 4 and the app crashes during the startup.

The stacktrace is below. I looked in the sources (android.view.ViewConfiguration) and what the device tries to do is to get fading marquee resource - here is

mFadingMarqueeEnabled = res.getBoolean(
            com.android.internal.R.bool.config_ui_enableFadingMarquee);

Does anyone has any idea what might be happening?

02-04 17:54:09.727: E/AndroidRuntime(16932): java.lang.RuntimeException: Unable to start activity ComponentInfo{myapp/myapp.Main}: android.content.res.Resources$NotFoundException: Resource ID #0x1110013
02-04 17:54:09.727: E/AndroidRuntime(16932):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
02-04 17:54:09.727: E/AndroidRuntime(16932):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
02-04 17:54:09.727: E/AndroidRuntime(16932):    at android.app.ActivityThread.access$600(ActivityThread.java:141)
02-04 17:54:09.727: E/AndroidRuntime(16932):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
02-04 17:54:09.727: E/AndroidRuntime(16932):    at android.os.Handler.dispatchMessage(Handler.java:99)
02-04 17:54:09.727: E/AndroidRuntime(16932):    at android.os.Looper.loop(Looper.java:137)
02-04 17:54:09.727: E/AndroidRuntime(16932):    at android.app.ActivityThread.main(ActivityThread.java:5039)
02-04 17:54:09.727: E/AndroidRuntime(16932):    at java.lang.reflect.Method.invokeNative(Native Method)
02-04 17:54:09.727: E/AndroidRuntime(16932):    at java.lang.reflect.Method.invoke(Method.java:511)
02-04 17:54:09.727: E/AndroidRuntime(16932):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
02-04 17:54:09.727: E/AndroidRuntime(16932):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
02-04 17:54:09.727: E/AndroidRuntime(16932):    at dalvik.system.NativeStart.main(Native Method)
02-04 17:54:09.727: E/AndroidRuntime(16932): Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x1110013
02-04 17:54:09.727: E/AndroidRuntime(16932):    at android.content.res.Resources.getValue(Resources.java:1014)
02-04 17:54:09.727: E/AndroidRuntime(16932):    at android.content.res.Resources.getBoolean(Resources.java:796)
02-04 17:54:09.727: E/AndroidRuntime(16932):    at android.view.ViewConfiguration.<init>(ViewConfiguration.java:301)
02-04 17:54:09.727: E/AndroidRuntime(16932):    at android.view.ViewConfiguration.get(ViewConfiguration.java:323)
02-04 17:54:09.727: E/AndroidRuntime(16932):    at android.view.View.<init>(View.java:3234)
02-04 17:54:09.727: E/AndroidRuntime(16932):    at android.view.ViewGroup.<init>(ViewGroup.java:420)
02-04 17:54:09.727: E/AndroidRuntime(16932):    at android.widget.FrameLayout.<init>(FrameLayout.java:93)
02-04 17:54:09.727: E/AndroidRuntime(16932):    at com.android.internal.policy.impl.PhoneWindow$DecorView.<init>(PhoneWindow.java:1816)
02-04 17:54:09.727: E/AndroidRuntime(16932):    at com.android.internal.policy.impl.PhoneWindow.generateDecor(PhoneWindow.java:2585)
02-04 17:54:09.727: E/AndroidRuntime(16932):    at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:2867)
02-04 17:54:09.727: E/AndroidRuntime(16932):    at com.android.internal.policy.impl.PhoneWindow.getDecorView(PhoneWindow.java:1568)
02-04 17:54:09.727: E/AndroidRuntime(16932):    at android.app.Activity.initActionBar(Activity.java:1861)
02-04 17:54:09.727: E/AndroidRuntime(16932):    at android.app.Activity.getActionBar(Activity.java:1848)
02-04 17:54:09.727: E/AndroidRuntime(16932):    at myapp.Main.onCreate(Main.java:75)
02-04 17:54:09.727: E/AndroidRuntime(16932):    at android.app.Activity.performCreate(Activity.java:5104)
02-04 17:54:09.727: E/AndroidRuntime(16932):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
02-04 17:54:09.727: E/AndroidRuntime(16932):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
02-04 17:54:09.727: E/AndroidRuntime(16932):    ... 11 more
John Boker
  • 82,559
  • 17
  • 97
  • 130

2 Answers2

1

I wouldn't use the internal resources because it would appear they are not public (and are subject to change).

have a look at The import com.android.internal.R cannot be resolved for more information on how you would get it to work the way you want.

Community
  • 1
  • 1
John Boker
  • 82,559
  • 17
  • 97
  • 130
0

It seems like the android framework installed on the LG Nexus 4 lacks com.android.internal.R.bool.config_ui_enableFadingMarquee

paulgavrikov
  • 1,883
  • 3
  • 29
  • 51
  • Right, but how and how to fix it :) – SnowmanX Feb 05 '13 at 19:30
  • you can either use another file or copy that file from the aosp site and bake it in your project. Then just refer to your local file. The android source can be found here: https://android.googlesource.com/ – paulgavrikov Feb 06 '13 at 20:03
  • Edit okay I realized it is a boolean value you need. Could you explain what this value exactly does / what you need it for. Maybe this would help more. – paulgavrikov Feb 06 '13 at 20:09
  • That's the problem - I don't need it. As you can see, the ViewGroup(FrameLayout) object needs it. – SnowmanX Feb 07 '13 at 00:31
  • Also copying it over is not a correct solution. This resource is supposed to be built-in resource. I shouldn't supply it with my app. – SnowmanX Feb 07 '13 at 00:32