activity cannot be resolved

by rakesh » Tue, 02 Feb 2010 16:55:31 GMT

Sponsored Links
 int mainBackGroundColor
        = activity .getResources.getColor
when iam trying to access a color resource iam getting activity cannot
be resolved error in eclipse. how can this be resolved.

thanks in advance


activity cannot be resolved

by jotobjects » Wed, 03 Feb 2010 01:25:45 GMT

 Do you have a res/values/color.xml file with main_back_ground_color

Are you "cleaning" and rebuilding your project?  It is necessary that
bin and gen directories are recreated any time there is a change to
resources such as colors.xml


Sponsored Links

Other Threads

1. Cyanogen 4.2.11

Cyanogen 4.2.11 is out..

link to xda-developers

Change Log
<>*---- v.4.2.11*
* Fixed ext filesystem confusion problems
* Added backwards compatibility code for services (fixes issues with apps
like K9 and Locale)
* Pinch zoom for Browser, pinch zoom and swipe for Gallery
* Updated French translations
* Updated contacts app from Wysie
* Fixed "add to playlist" while BT enabled
* Fixed FC of select contact button in MMS
* Fixed browser download list
* Minor image tweaks from prash
* Other stuff!

Bayu Wicaksono

Google Groups "Indonesian Android Community [id-android]" group.

To post to this group, send email to

To request to subscribe to this group:


2. Loading 2.0.1 to ADP2

Hi All,

Please forgive my ignorance. Athough I see the following in the
official description of the ADP2:

Modify and rebuild the Android operating system, and flash it onto a

I'm not able to find anywhere a downloadable 2.0 or 2.0.1 for the
ADP2, nor any indication that it could be done. To the contrary I see
all kind of discussions suggesting it's either not possible, or at
least not YET possible.

May someone please explain a developer withOUT any Android specific
background, what is so difficult in uplading a new version of an O/S
to a device that's specifically desgined for such purpose?

Do I really need to wait for HTC?

Thanks in advance,

Ron Pinkas


3. VideoView playback fails on 2.0.1? MediaPlayer warnings in logcat

4. Problem with map display on emulator with kml file

5. adding application in andrdoid source code

6. Achieving evenly spaced buttons on a layout

7. How can I put a TextView on a Layout without using an xml-file? What is wrong in my code?