views:

26

answers:

3

This might be a pretty basic question, or peculiar to my set up (hopefully not too peculiar)

I am new to android development and have been playing around with the tutorials offered at developer.android.com.

I don't have a problem with projects I create from scratch, but when I start a project from the android sample code provided at android.com or from any other android project, I can never seem to get the bugs out to even run the thing.

For example, when loading up the NotePad sample in the android-7 package of samples -

from the error log I see:

Failed to load properties file com.android.ide.eclipse.adt Problems occurred when invoking code from plug-in: "org.eclipse.jface".

from the problems log I get:

error_message cannot be resolved or is not a field menu_delete cannot be resolved or is not a field
menu_discard cannot be resolved or is not a field text_edit cannot be resolved or is not a field

etc., didn't want to list them all

It seems that it is not playing well with the strings.xml file in res/values

Have tried: 1. Importing anything missing w/ cmd,shft,O 2. Fixing properties from Android Tools 3. Project>>Clean... 4. Making sure that the SDK Versions all match up 5. Restarting and restarting

Nothing, still getting the error.

Anyone have any ideas what I am doing wrong?

would like a general solution, something more global bc this is occurring whenever I pull in anyone's source code from outside.

kind of frustrated because I feel that I am spending too much time working out these kinks and not being able to study other people's code against how it performs in the emulator.

A: 

I had similar issues and were related to the SDK version I was choosing when importing the samples. You have to pick the same version used to create the project. I believe it's 1.5

Ricardo Villamil
Thanks, I did try that, turns out for the case of the NotePad Android sample provided in the SDK that all I had to do was DELETE the last line in the Manifest file:"<uses-sdk android:targetSdkVersion="1.5"android:minSdkVersion="3"/>"i'd never seen this before and felt like it was unecessary when the file had already declared this information above...all errors dried up.
QuomoPete
A: 

Rookie mistakes - was looking at the wrong numbers to determine what version to attach to an imported project.

QuomoPete
A: 

Sometimes, you can also try a right-click on your project, then Android, then "fix project properties".

Hope I have helped. Regards from France ;)

Squ36