Hello all I am a newbie with the android and java enviroment but I come from a pretty thick, php/javascript/mysql/ajax/ect..ect.. background.
Anyways I have been working with some tutorials and I keep getting stuck in one place. Looking through the forums I am not the only one. R.id cannot be resolved...ugh
I am wanting to create a button,
i started with a simple splash screen then wanted it to open up to some buttons, this code of course is not complete but doesnt matter because it still gives the same error
dice.java
Using java Syntax Highlighting
- package dice.assist.com;
- import android.app.Activity;
- import android.content.Intent;
- import android.os.Bundle;
- import android.os.Handler;
- import android.view.Menu;
- import android.widget.Button;
- public class dice extends Activity {
- // ===========================================================
- // Fields
- // ===========================================================
- private final int SPLASH_DISPLAY_LENGHT = 1000;
- // ===========================================================
- // "Constructors"
- // ===========================================================
- /** Called when the activity is first created. */
- @Override
- public void onCreate(Bundle icicle) {
- super.onCreate(icicle);
- setContentView(R.layout.main);
- /* New Handler to start the Menu-Activity
- * and close this Splash-Screen after some seconds.*/
- new Handler().postDelayed(new Runnable(){
- public void run() {
- /* Create an Intent that will start the Menu-Activity. */
- Intent mainIntent = new Intent(dice.this,Menu.class);
- dice.this.startActivity(mainIntent);
- dice.this.finish();
- }
- }, 5000);
- }
- Button button=(Button) findViewById(R.id.d6button);
- }
Parsed in 0.035 seconds, using GeSHi 1.0.8.4
main.xml
Using xml Syntax Highlighting
- <?xml version="1.0" encoding="utf-8"?>
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- >
- <ImageView
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:scaleType="fitCenter"
- android:src="@drawable/splash"
- />
- <Button
- android:id="@+id/d6button"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:text:="1D6"
- />
- </LinearLayout>
Parsed in 0.002 seconds, using GeSHi 1.0.8.4
and my r.java
Using java Syntax Highlighting
- /* 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 dice.assist.com;
- public final class R {
- public static final class attr {
- }
- public static final class drawable {
- public static final int icon=0x7f020000;
- public static final int splash=0x7f020001;
- }
- public static final class layout {
- public static final int main=0x7f030000;
- }
- public static final class string {
- public static final int app_name=0x7f040001;
- public static final int hello=0x7f040000;
- }
- }
Parsed in 0.032 seconds, using GeSHi 1.0.8.4
i was noticing it is not creating a id class. even if i hit ctrl.shift.o.
so I think I see why I am getting the error but how do i fix?
Thanks for any help!

