Been staring at my code for an hour and still can't see the issue. Android - Java development -
java:
package com.example.test1; import android.app.activity; import android.os.bundle; public class splash extends activity { @override protected void oncreate(bundle travislovebacon) { // todo auto-generated method stub super.oncreate(travislovebacon); setcontentview(r.layout.splash);} thread timer = new thread(){ public void run(){ try{ sleep(5000); } catch (interruptedexception e){ e.printstacktrace(); }finally{ intent openstartingpoint = new intent ("com.example.test1.mainactivity"); startactivity(openstartingpoint); } } } ; timer.start(); xml:
<?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:background="@drawable/splash_background"> </linearlayout> edit: terribly sorry! posting in haste , forgot list errors.
timer.start(); - syntax error, insert "}" complete classbody - syntax error on token "start", identifier expected after token
i've been staring @ code hour , can't find issue. know bug stupid syntax error thats staring right @ me.
any appreciated!
delete ; before timer.start(); , delete } @ end of setcontentview(r.layout.splash);} line.
Comments
Post a Comment