綁定帳號登入

Android 台灣中文網

打印 上一主題 下一主題

[求助] 程式沒辦法開啟

[複製連結] 查看: 937|回覆: 0|好評: 0
跳轉到指定樓層
樓主
jeteriza | 收聽TA | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
發表於 2013-11-17 22:11

馬上加入Android 台灣中文網,立即免費下載應用遊戲。

您需要 登錄 才可以下載或查看,沒有帳號?註冊

x
煩請大大幫忙,小弟是最近剛開始碰的超級新手,試著寫第一個程式,但是在ECLIPSE上DUBUG都沒有錯誤了,但是在模擬器上安裝完後,卻沒辦法開啟,開如何解決呢?是沒有正確呼叫到活動嗎?還是還有其他地方要注意的嗎?

APP project target: android 4.2.2 api17
使用的模擬器 :  android 4.2.2 api17



LAYOUT 內容:

<?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" >

    <TextView
        android:id="@+id/textview1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/tv01" />

    <Button
        android:id="@+id/button1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/bt01" />

</LinearLayout>



JAVA程式內容:

package jeter.iza;
import com.Jeter.iza.*;
import android.os.Bundle;
import android.widget.Button;
import android.view.View;
import android.app.Activity;
import android.widget.TextView;

public class main_IZA extends Activity {
       
        /** Called when the activity is first created. */
        @Override
        public void onCreate(Bundle savedInstanceState) {
                super.onCreate(savedInstanceState);
                setContentView(R.layout.main);

                final Button button1 = (Button)findViewById(R.id.button1);
                final TextView textView1 = (TextView)findViewById(R.id.textview1);
   
   
                button1.setOnClickListener(new Button.OnClickListener(){

            @Override
            public void onClick(View v) {

            // TODO Auto-generated method stub

            textView1.setText("OK~!");

        }
           
    });
        
        }
}   
「用Android 就來APK.TW」,快來加入粉絲吧!
Android 台灣中文網(APK.TW)
收藏收藏 分享分享 分享專題
用Android 就來Android 台灣中文網(https://apk.tw)
回覆

使用道具 舉報

您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則