Syntax error on Token "Void", @ expected
run cannot be resolved to a type
Sytax error, insert enumBody to complete BlockStatement!
這些都是3個錯誤,我在下面的腳本中獲取。什麼可能是問題?請注意,所有不需要的東西可能屬於我的其他功能和東西。我有所有的進口過於現實:)我得到的3個錯誤,當我嘗試運行定時器
import android.app.Activity;
import android.content.Intent;
public class MainStuff extends Activity {
TextView tere;
TextView dateatm;
TextView timeatm;
String nimi;
String ip;
protected static final int REFRESH = 0;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.menu);
// Refresh after 5 sec... //
Thread refresherAplle = new Thread();
public void run(){
try{
int refresherApple = 0;
while (refresherApple < 5000){
sleep(100);
refresherApple = refresherApple + 100;
}
startActivity(new Intent("viimane.voimalus.REFRESHER"));
}
finally{
finish();
}
}
也應該啓動線程:refreshAplle.start(); :) – Houcine
Aww,我不能決定哪一個標記,但因爲你說「開始線程」,那麼你得到它:),因爲我也錯過了這一點:P – Elven