java - The Jar of this class file blongs to container Android 2.0.1 which does not allow modifications -
can 1 provide me solution error have searched alot problem failed
i using eclipse adt
with android sdk 2.0.1
os microsoft windows vista x86
does article "making eclipse show android’s source" (from malcolm rowe) help? (for sdk1.5, adapt 2.0)
once have source jar, you’d expect attach directly library in eclipse, doesn’t work android sdk. eclipse says:
“the jar of class file belongs container ‘android 1.5’ not allow modifications source attachments on entries.”
which roundabout way of saying source path fixed.
if open eclipse project properties dialog, changejava build path
page ,libraries
tab, expand ‘android 1.5
’ library container ,android.jar
file (phew!), you’ll see ‘source attachment
’ option, shows source expected be.
for android 1.5 sdk, sdk
location/platforms/android-1.5/sources
(and presumably android 1.1 target), sdk location path set in ‘workspace preferences
’ android page.
note 1.0 sdk (which supported 1.0 target, of course) appends string sources sdk location, on assumption sdk location ended trailing slash. (this should out if need target 1.0; i’m pretty sure fixed in plugin provided 1.1 sdk.)there 2 ways put source jar right place.
- the conventional way create directory called sources/ under
platforms/android-1.5/
(or1.1
), , unzip jar (which zip file) directory.- however, although sources doesn’t have extension, eclipse doesn’t require directory, simpler way rename source jar it’s called sources, , move relevant directory.
once you’ve moved file or files right places, need eclipse take note of it. found restarting eclipse enough, if doesn’t work try refreshing project, or closing , re-opening project via context menus.
Comments
Post a Comment