Monday, 15 February 2010

java - (R.layout.splash); splash cannot be resolved or is not a field -



java - (R.layout.splash); splash cannot be resolved or is not a field -

i'm in middle of making first android app on eclipse, , running problem. i'm getting splash cannot resolved or not field error. code working 10 min ago. next link project in dropbox. away if want, can test theories out on it. https://www.dropbox.com/sh/1sg8p9uvjbolqxx/aadcmipwb_jveysb01b_hutba next re-create of code java side.

public class splash extends activity { @override protected void oncreate(bundle savedinstancestate) { // todo auto-generated method stub super.oncreate(savedinstancestate); setcontentview(r.layout.splash); thread timer = new thread() { public void run() { try{ sleep(5000); } grab (interruptedexception e) { e.printstacktrace(); } { intent openstartingpoint = new intent("com.techreviewsandhelp.carteretcountyhistoryguide.mainactivity"); startactivity(openstartingpoint); } } }; timer.start(); } @override protected void onpause() { // todo auto-generated method stub super.onpause(); finish(); } }

xml

<?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="schemas.android.com/apk/res/android"; android:layout_width="match_parent" android:layout_height="match_parent" android:background="#000000" android:gravity="center" android:orientation="vertical" android:id="@+id/splash"> <imageview android:id="@+id/imageview1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/trh" /> </linearlayout>

verify if dont have erros in layout splash file. project not building r because have error in xml file. seek find , clear project.

java android eclipse xcode splash

No comments:

Post a Comment