[TIMOB-16953] Android: Unable to start activity due to Resources 'NotFoundException'
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-05-23T20:48:33.000+0000 |
Affected Version/s | Release 3.3.0 |
Fix Version/s | 2014 Sprint 10, 2014 Sprint 10 Tooling, Release 3.3.0 |
Components | Android |
Labels | module_android, qe-manualtest, regression |
Reporter | Allen Yeung |
Assignee | Chris Barber |
Created | 2014-05-13T18:40:54.000+0000 |
Updated | 2014-08-07T22:13:06.000+0000 |
Description
Steps to reproduce:
1. Import the attached project
2. Build and run on device
Expected result:
The app should run fine.
Actual Result:
At app launch, there is an error:
[ERROR] : TiApplication: (main) [369,369] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to start activity ComponentInfo{com.webserviceCall/com.webserviceCall.WebservicecallActivity}: android.content.res.Resources$NotFoundException: Resource ID #0x7f020058; Titanium 3.3.0,2014/05/13 11:26,901a4ab
[ERROR] : TiApplication: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.webserviceCall/com.webserviceCall.WebservicecallActivity}: android.content.res.Resources$NotFoundException: Resource ID #0x7f020058
[ERROR] : TiApplication: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
[ERROR] : TiApplication: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
[ERROR] : TiApplication: at android.app.ActivityThread.access$600(ActivityThread.java:141)
[ERROR] : TiApplication: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
[ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:99)
[ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:137)
[ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5041)
[ERROR] : TiApplication: at java.lang.reflect.Method.invokeNative(Native Method)
[ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Method.java:511)
[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
[ERROR] : TiApplication: at dalvik.system.NativeStart.main(Native Method)
[ERROR] : TiApplication: Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f020058
[ERROR] : TiApplication: at android.content.res.Resources.getValue(Resources.java:1014)
[ERROR] : TiApplication: at android.content.res.Resources.getDrawable(Resources.java:659)
[ERROR] : TiApplication: at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:2832)
[ERROR] : TiApplication: at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:2875)
[ERROR] : TiApplication: at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:285)
[ERROR] : TiApplication: at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:279)
[ERROR] : TiApplication: at android.app.Activity.setContentView(Activity.java:1901)
[ERROR] : TiApplication: at android.support.v7.app.ActionBarActivity.superSetContentView(ActionBarActivity.java:220)
[ERROR] : TiApplication: at android.support.v7.app.ActionBarActivityDelegateICS.setContentView(ActionBarActivityDelegateICS.java:105)
[ERROR] : TiApplication: at android.support.v7.app.ActionBarActivity.setContentView(ActionBarActivity.java:81)
[ERROR] : TiApplication: at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:526)
[ERROR] : TiApplication: at org.appcelerator.titanium.TiLaunchActivity.onCreate(TiLaunchActivity.java:144)
[ERROR] : TiApplication: at org.appcelerator.titanium.TiRootActivity.onCreate(TiRootActivity.java:97)
[ERROR] : TiApplication: at android.app.Activity.performCreate(Activity.java:5104)
[ERROR] : TiApplication: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
[ERROR] : TiApplication: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
[ERROR] : TiApplication: ... 11 more
Note that this works in 3.2.3.GA, but not in 3.3.0
Attachments
File | Date | Size |
---|---|---|
webserviceCall.zip | 2014-05-13T18:40:54.000+0000 | 90834 |
Pull request: https://github.com/appcelerator/titanium_mobile/pull/5689 To test, build the attached project for Android emulator. You should be able to build any project as long as you don't have a default.png in the Resources/android folder.
App runs fine on Android device/emulator and does not throw any error. Verified on: OSX: 10.9.2 Appcelerator Studio: 3.3.0.201405161313 Titanium SDK: 3.3.0.v20140516180912 CLI: 3.3.0-alpha2 Device: Galaxy S5 (v4.4.2), Emulator (v2.3.3)
UPDATE! Android changed the analytics database location so you if you run into this error, uninstall the app from your device/emulator and try again.