마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

Unfortunately _____has stopped 의 오류좀 찾아주세요.

0 추천

버튼 클릭시 엑티비티 바뀌는 소스입니다. 버튼을 클릭하면

자꾸 Unfortunately,_______________has stopped라고 뜨네요... 오류좀 찾아주세요..

정말 찾아주시면 감사하겠습니다. 안드로이드 초보라..힘드네요..

FirstActivity.java입니다 아래는 코드입니다.

-----------------------------------------------------------------------------------

package com.example.testtest;

import android.app.Activity;
import android.os.Bundle;
import android.content.Intent;
import android.view.View;
import android.widget.Button;
import android.view.View.OnClickListener;
import android.widget.Button;


public class FirstActivity extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_first);

Button button=(Button)findViewById(R.id.first_btn);
button.setOnClickListener(new OnClickListener()
{
public void onClick(View v){


Intent intent=new Intent(FirstActivity.this, SecondActivity.class);
startActivity(intent);
}
});
}
}
-----------------------------------------------------------------------------------

SecondActivity.java입니다 아래는 코드입니다.

-----------------------------------------------------------------------------------

package com.example.testtest;

import android.app.Activity;
import android.os.Bundle;

public class SecondActivity extends Activity {

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_second);
// TODO Auto-generated method stub
}
}
-----------------------------------------------------------------------------------

activity_first.xml입니다 아래는 코드입니다.

-----------------------------------------------------------------------------------

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation = "vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<Button
android:id="@+id/first_btn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="let's START"
android:textSize="15sp"
/>
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src= "@drawable/main_deco"
android:adjustViewBounds="true"
/>
< /LinearLayout>

-----------------------------------------------------------------------------------

activity_second.xml입니다 아래는 코드입니다.

-----------------------------------------------------------------------------------

<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:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@+string/second"
android:textSize="15sp"
/>

</LinearLayout>
-----------------------------------------------------------------------------------

haaa (170 포인트) 님이 2014년 5월 8일 질문

1개의 답변

+1 추천
 
채택된 답변

-----------------------------------------------------------------------------------

activity_second.xml입니다 아래는 코드입니다.

-----------------------------------------------------------------------------------

<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:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@+string/second"
android:textSize="15sp"
/>

</LinearLayout>

 

첫글자 대문자로 바꿔주세요 TextView

초보개발자ㅠ (33,870 포인트) 님이 2014년 5월 9일 답변
haaa님이 2014년 5월 12일 채택됨
...