[android-developers] Resource not found exception

2011-08-02 Thread Andy


I am getting weird exception about resource not found crashed reported
in my developer console in a activity MenuActivity. When I search for
that Resource ID #0x7f030008 in my R.java it is listed as another
layout identifier that is not referenced anywhere except loaded from
another activity. I never get this error on my Samsung where I tested
the app. How do you go about debugging such corruptions?
My reviews are equal number in 5 star and 1 star category. I suspect
this error happens on some devices and those users jump online and
rate the app 1 star :(  Any pointers would be welcome.

minsdklevel is 7 and I have all layouts in layout-land
and all images/xmls in
drawable-mdpi
drawable-ldpi
drawable-hdpi


 public static final class layout {
...
public static final int no_of_persns=0x7f030008;
...
}



v1.1.10
Jul 29, 2011 4:14:39 AM
1 reports/week
1 reports
java.lang.RuntimeException: Unable to start activity
.MenuActivity
android.content.res.Resources$NotFoundException: Resource ID
#0x7f030008
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
1748)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
1764)
at android.app.ActivityThread.access$1500(ActivityThread.java:122)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:
1002)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:132)
at android.app.ActivityThread.main(ActivityThread.java:4025)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:491)
at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:841)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.content.res.Resources$NotFoundException: Resource
ID #0x7f030008
at android.content.res.Resources.getValue(Resources.java:1014)
at android.content.res.Resources.loadXmlResourceParser(Resources.java:
2049)
at android.content.res.Resources.getLayout(Resources.java:853)
at android.view.LayoutInflater.inflate(LayoutInflater.java:389)
at android.view.LayoutInflater.inflate(LayoutInflater.java:347)
at
com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:
226)
at android.app.Activity.setContentView(Activity.java:1780)
at
com.softarcstudios.poolcue3dlite.BilliardMenuActivity.onCreate(Unknown
Source)
at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1048)
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
1712)
... 11 more


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Resource not found exception

2011-08-02 Thread Raghav Sood
Try regenerating R.java from scratch. I delete the entire gen folder every
now and then and let eclipse recreate the entire R class.

Thanks

On Tue, Aug 2, 2011 at 9:35 PM, Andy allway...@gmail.com wrote:



 I am getting weird exception about resource not found crashed reported
 in my developer console in a activity MenuActivity. When I search for
 that Resource ID #0x7f030008 in my R.java it is listed as another
 layout identifier that is not referenced anywhere except loaded from
 another activity. I never get this error on my Samsung where I tested
 the app. How do you go about debugging such corruptions?
 My reviews are equal number in 5 star and 1 star category. I suspect
 this error happens on some devices and those users jump online and
 rate the app 1 star :(  Any pointers would be welcome.

 minsdklevel is 7 and I have all layouts in layout-land
 and all images/xmls in
 drawable-mdpi
 drawable-ldpi
 drawable-hdpi


  public static final class layout {
...
public static final int no_of_persns=0x7f030008;
...
}



 v1.1.10
 Jul 29, 2011 4:14:39 AM
 1 reports/week
 1 reports
 java.lang.RuntimeException: Unable to start activity
 .MenuActivity
 android.content.res.Resources$NotFoundException: Resource ID
 #0x7f030008
 at
 android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
 1748)
 at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
 1764)
 at android.app.ActivityThread.access$1500(ActivityThread.java:122)
 at android.app.ActivityThread$H.handleMessage(ActivityThread.java:
 1002)
 at android.os.Handler.dispatchMessage(Handler.java:99)
 at android.os.Looper.loop(Looper.java:132)
 at android.app.ActivityThread.main(ActivityThread.java:4025)
 at java.lang.reflect.Method.invokeNative(Native Method)
 at java.lang.reflect.Method.invoke(Method.java:491)
 at com.android.internal.os.ZygoteInit
 $MethodAndArgsCaller.run(ZygoteInit.java:841)
 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
 at dalvik.system.NativeStart.main(Native Method)
 Caused by: android.content.res.Resources$NotFoundException: Resource
 ID #0x7f030008
 at android.content.res.Resources.getValue(Resources.java:1014)
 at android.content.res.Resources.loadXmlResourceParser(Resources.java:
 2049)
 at android.content.res.Resources.getLayout(Resources.java:853)
 at android.view.LayoutInflater.inflate(LayoutInflater.java:389)
 at android.view.LayoutInflater.inflate(LayoutInflater.java:347)
 at

 com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:
 226)
 at android.app.Activity.setContentView(Activity.java:1780)
 at
 com.softarcstudios.poolcue3dlite.BilliardMenuActivity.onCreate(Unknown
 Source)
 at
 android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
 1048)
 at
 android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
 1712)
 ... 11 more


 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Raghav Sood
http://www.raghavsood.com/
http://wiki.androidappcheck.com/
http://www.telstop.tel/
https://market.android.com/developer?pub=Appaholics

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Resource not found exception when my activity goes to background

2011-05-25 Thread Shashidhar
Hi,
 I have an application in which I refresh the GUI ( set some images in my
layout ) for every one second.
Its all working well when the activity is in foreground. But when it goes to
background ( ex. when I press home button) it starts throwing exception
saying Resource not found when try to get the image to apply on UI. Can
any one tell me why is this happening and how to take care of this scenario.

Please find the log from my eclipse below.

05-25 14:22:50.075: WARN/ResourceType(1339): Failure getting entry for
0x7f020061 (t=1 e=97) in package 0 (error -75)
05-25 14:22:50.075: WARN/System.err(1339):
android.content.res.Resources$NotFoundException: Resource ID #0x7f020061
05-25 14:22:50.075: WARN/System.err(1339): at
android.content.res.Resources.getValue(Resources.java:892)
05-25 14:22:50.075: WARN/System.err(1339): at
android.content.res.Resources.getDrawable(Resources.java:580)
05-25 14:22:50.075: WARN/System.err(1339): at
android.view.View.setBackgroundResource(View.java:7533)
05-25 14:22:50.085: WARN/System.err(1339): at
android.sample.MyActivity.setImgAndPerc(MyActivity.java:2879)


Thanks,
Shashidhar

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] resource not found exception - framework

2011-03-11 Thread Krt
Hi All,

I was trying to replace exisiting status bar with custom one, the
following are the steps I tried:

1) I added a new project file in framework/base as 'customstatus' ,
all my source of new status bar and resuorce elements are here. When I
compile this I get the custom-res.apk ,

2) Further I modified build/core/pathap.mk to my customstatus (under
FRAMEWORK_BASE_SUBDIRS)

3) framework/base/Android.mk , added my resource file path as
customstatus-source-path := APPS/customstatus-res_intermediates/src
LOCAL_INTERMEDIATE_SOURCES := $(customstatus-source-path)/com/mist/
customstatus/R.java

4) in /frameorks/base/services/java/com/android/server/status/
StatusBarService.java , in this I replaced original status bar view
with my customstatus bar view.

I comiled framework , copied framework.jar,
services.jar ,customstatus-
res.apk into my device, rebooted, I see my custom status bar.


Now , I wanted to add a icon for volume , so added a icon iamge in my
customstatus/res/drawable , used it in my sustom status bar java file,
the source compiled fine. But when I deploy this on board I get the
error:

E/AndroidRuntime( 1370): *** EXCEPTION IN SYSTEM PROCESS.  System will
crash.
E/AndroidRuntime( 1370): android.content.res.Resources
$NotFoundException: Resource ID #0x7f020001
E/AndroidRuntime( 1370):at
android.content.res.Resources.getValue(Resources.java:891)
E/AndroidRuntime( 1370):at
android.content.res.Resources.getDrawable(Resources.java:579)
E/AndroidRuntime( 1370):at
android.view.View.setBackgroundResource(View.java:7186)
E/AndroidRuntime( 1370):at
com.mist.customstatus.CustomStatusBarView.setVolumeLealarm_release:
clear alarm, pending 0
vel(CustomStatusBarView.java:82)binder: release 1370:1370 transaction
3048 in, still active

E/AndroidRuntime( 1370):at cbinder: send failed reply for
transaction 3048 to 1425:1425
om.android.server.status.StatusBarService.updateVolumeLevel(StatusBarService.java:
372)
E/AndroidRuntime( 1370):at
com.android.server.status.StatusBarService.performAddUpdateIcon(StatusBarService.java:
758)
E/AndroidRuntimrequest_suspend_state: wakeup (0-0) at 111298797610
(2000-01-01 00:01:50.057922363 UTC)
e( 1370):   at com.android.server.status.StatusBarService
$H.handleMessage(StatusBarService.java:648)



I further unzipped the customstatus-res.apk to see if my image files
are there, they were all present. tried aapt resource dump too , I see
the corresponding entries inR.java file.

Any Idea what could be going wrong?

Where else should I be placing the sources if my customstaus is not
the right place?

Any help would be appreciated.

Regards,
Krt

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Resource not found exception in ListActivity

2010-09-02 Thread Bret Foreman
I'm using ListActivity with an ArrayAdapter as the list adapter and
getting a resource not found exception. When I build the ArrayAdapter
I call the constructor like this:

new ArrayAdapterString(this,resourceID,stringList);

If my list row layout in layout/listLayout.xml looks like this:

?xml version=1.0 encoding=utf-8?
LinearLayout android:id=@+id/listLinearLayout
android:layout_width=fill_parent android:layout_height=fill_parent
xmlns:android=http://schemas.android.com/apk/res/android;
TextView android:text=None set android:id=@+id/
chooseTableRowTextView android:layout_width=wrap_content
android:layout_height=wrap_content/TextView
/LinearLayout

Should the resourceID field in the constructor be R.layout.listLayout,
R.id.listLinearLayout, or R.id.chooseTableRowTextView?


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Resource not found exception in ListActivity

2010-09-02 Thread TreKing
On Thu, Sep 2, 2010 at 12:47 PM, Bret Foreman bret.fore...@gmail.comwrote:

 Should the resourceID field in the constructor be
 R.layout.listLayout, R.id.listLinearLayout, or R.id.chooseTableRowTextView?


You could probably just try them all and see what happens in about 30
seconds ... but ...

If you're using this constructor (not clear what stringList is)
*public ArrayAdapter (Context context, int textViewResourceId, ListT
objects)*

Then, as the parameter name implies, this is the resource ID of the TextView
you want the string to show up in.
So R.id.chooseTableRowTextView.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en