I'm dealing with the multiple screen support issue of android applications. To support different screen size, I followed the second answer in this thread, which is creating those folders in the file system.
However I didn't create these folders through eclipse and actually I don't know whether we can do that. I created them directly in file system. And then, I renamed xml files and add one new xml file in the original layout folder. Next I copied the xml files in the original layout folder to each of the new directories. Question is: Is it right steps to create different screen size layouts?
After this, I go to activities (the .java files) to change the layout names, since I renamed the xml files. However I cannot find the renamed files but the original ones. So I followed this thread since I also get the same problem. After doing project->clean, I have error symbol (the red cross) on each of my activities, and turned out in the imports, import com.mylocalname.R;
cannot be resolved since R.java
is not generated. I didn't import android.R
.
According to what I found, R.java is not generated maybe because xml file has some errors. However I cannot see any red cross on those files. So how to fix this problem?
So the project is in a mess now. Does anyone have an idea on how to solve the problem? Thanks a lot in advance.
EDIT:
I'm using android platform 4.1 and API level 16.
The xml files' graphical layouts in the layout folder (not in the layout-X or layout-X-X folders):
project structures with res expand: