I've been working on implementing an RSS feeder based on an old tutorial that I've been following.
NewsDroid RSS Reader | Hello Android
There are a number of errors as the tutorial using quite dated syntax and degenerate functions. That aside, I'm having problems with my R.java file.
This is one of the .xml files I have saved in my res/layout folder called articles_list.xml
Correspondingly - my R.java looks like
articles_list is appearing in the appropriate place in the R.java file. But when I reference said file in my code as seen below:
I get the error that "articles_list cannot be resolved or is not a field."
I have the same problem with my other layouts as well as all the strings I have saved in strings.xml. I don't understand why I can't reference the data members that are clearly present in R.java.
Thanks.
NewsDroid RSS Reader | Hello Android
There are a number of errors as the tutorial using quite dated syntax and degenerate functions. That aside, I'm having problems with my R.java file.
This is one of the .xml files I have saved in my res/layout folder called articles_list.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ListView android:id="@+id/android:list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView android:id="@+id/android:empty"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Loading articles..."/>
</LinearLayout>
Code:
/* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/
package newsDroid.com;
public final class R {
public static final class attr {
}
public static final class drawable {
public static final int icon=0x7f020000;
}
public static final class id {
public static final int cancel=0x7f050002;
public static final int ok=0x7f050003;
public static final int text1=0x7f050000;
public static final int url=0x7f050001;
}
Code:
public static final class layout {
public static final int article_row=0x7f030000;
public static final int articles_list=0x7f030001;
public static final int feeds_list=0x7f030002;
public static final int feeds_row=0x7f030003;
public static final int main=0x7f030004;
public static final int url_editor=0x7f030005;
}
Code:
public static final class string {
public static final int app_name=0x7f040000;
public static final int articles_list=0x7f040006;
public static final int button_cancel=0x7f040004;
public static final int button_ok=0x7f040003;
public static final int menu_delete=0x7f040002;
public static final int menu_insert=0x7f040001;
public static final int url_editor=0x7f040005;
}
}
articles_list is appearing in the appropriate place in the R.java file. But when I reference said file in my code as seen below:
Code:
setContentView(R.layout.articles_list);
I have the same problem with my other layouts as well as all the strings I have saved in strings.xml. I don't understand why I can't reference the data members that are clearly present in R.java.
Thanks.
