초보개발자입니다.
간단한 에러인데 해결 못하고 있습니다.
왜 에러가 나는지 알려주세요. 해결방법도 알려주시면 감사해요..
package com.xxx;
import android.app.Activity;
import android.content.*;
import android.content.res.*;
import android.net.*;
import android.os.Bundle;
import android.view.*;
import android.view.View.*;
import android.widget.*;
public class xxx extends Activity {
/** Called when the activity is first created. */
ImageView mainimage;
String sStart;
int screenW;
int screenH;
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
setContentView(R.layout.no1);
}
public int getLcdSIzeWidth()
{
return ((android.view.WindowManager) getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay().getWidth();
}
public int getLcdSIzeHeight()
{
return ((android.view.WindowManager) getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay().getHeight();
)} --------------------------■ 이부분 에러(에러내용 : Multiple markers at this line
- Syntax error on token ")", delete this token
- Syntax error, insert "}" to complete ClassBody)
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.no1);
imgbtn.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
ImageButton image_button01 = (ImageButton)findViewById(R.id.Button01);
ImageButton image_button02 = (ImageButton)findViewById(R.id.Button02);
ImageButton image_button03 = (ImageButton)findViewById(R.id.Button03);
ImageButton image_button04 = (ImageButton)findViewById(R.id.Button04);
ImageButton image_button05 = (ImageButton)findViewById(R.id.Button05);
ImageButton image_button06 = (ImageButton)findViewById(R.id.Button06);
ImageButton infoButton = (ImageButton)findViewById(R.id.infoButton);
ImageButton personButton = (ImageButton)findViewById(R.id.personButton);
findViewById(R.id.Button01).setOnClickListener(mClickListener);
findViewById(R.id.Button02).setOnClickListener(mClickListener);
findViewById(R.id.Button03).setOnClickListener(mClickListener);
findViewById(R.id.Button04).setOnClickListener(mClickListener);
findViewById(R.id.Button05).setOnClickListener(mClickListener);
findViewById(R.id.Button06).setOnClickListener(mClickListener);
findViewById(R.id.infoButton).setOnClickListener(mClickListener);
findViewById(R.id.personButton).setOnClickListener(mClickListener);
Button.OnClickListener mClickListener = new View.OnClickListener() {
public void onClick(View v) {
Intent intent;
switch (v.getId()) {
case R.id.Button01:
intent = new Intent(Intent.ACTION_VIEW,
Uri.parse("xxx"));
startActivity(intent);
break;
case R.id.Button02:
intent = new Intent(Intent.ACTION_VIEW,
Uri.parse("xxx"));
startActivity(intent);
break;
case R.id.Button03:
intent = new Intent(Intent.ACTION_VIEW,
Uri.parse("xxx"));
startActivity(intent);
break;
case R.id.Button04:
intent = new Intent(Intent.ACTION_VIEW,
Uri.parse("xxx"));
startActivity(intent);
break;
case R.id.Button05:
intent = new Intent(Intent.ACTION_VIEW,
Uri.parse("xxx"));
startActivity(intent);
break;
case R.id.Button06:
intent = new Intent(Intent.ACTION_VIEW,
Uri.parse("xxx"));
startActivity(intent);
break;
case R.id.infoButton:
intent = new Intent(Intent.ACTION_VIEW,
Uri.parse("xxx"));
startActivity(intent);
break;
case R.id.personButton:
intent = new Intent(Intent.ACTION_VIEW,
Uri.parse("xxx"));
startActivity(intent);
break;
View buttonMain = null;
buttonMain.setOnClickListener((OnClickListener) this);
}
}
public void onClick(View src) {
Intent i = new Intent();
i = new Intent(this, no1main.class);
i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(i);
finish();
}--------------------------■ 이부분 에러
(에러내용)
Multiple markers at this line
- Syntax error, insert "}" to complete MethodBody
- Syntax error, insert "}" to complete ClassBody
- Syntax error, insert ")" to complete Expression
- Syntax error, insert ";" to complete
LocalVariableDeclarationStatement
- Syntax error, insert ";" to complete Statement



