When I am tring to save a java file, an error occured and and I can not save the file.
Error is :
"Some characters can not be mapped using Cp1252 character encoding."
My Code is :
package org.anddev.android.HelloWorld;
import android.app.Activity;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.*;
public class LifeCycleDemo extends Activity {
LinearLayout myScreen;
TextView txtColorSelect;
int actMode = 0;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.lifecycledemo);
myScreen = (LinearLayout) findViewById(R.id.myScreen);
TextView txtToDo = (TextView) findViewById(R.id.txtToDo);
String msg =
"Instructions: \n" + "0. New instance (onCreate, onStart, onResume) \n" + "1. Back Arrow (onPause, onStop, onDestroy) \n" + "2. Finish (onPause, onStop, onDestroy) \n" + "3. Home (onPause, onStop) \n" + "4. After 3 > App Tab > re-execute current app \n" + " (onRestart, onStart, onResume) \n" + "5. Run DDMS > Receive a phone call or SMS \n" + " (onRestart, onStart, onResume) \n" + "6. Enter some data - repeat steps 1-5 \n";
txtToDo.setText(msg); @Override
protected void onPause() { super.onPause(); //saveDataFromCurrentState();
Toast.makeText(this, "onPause", 1).show();
}
@Override
protected void onRestart() { super.onRestart();
Toast.makeText(
this, "onRestart", 1).show();
}
@Override
protected void onResume() {
super.onResume();
Toast.makeText(
this, "onResume", 1).show();
}
@Override
protected void onStart() {
// TODO Auto-generated method stub
super.onStart();
//updateFromSavedState(); Toast.makeText(this, "onStart", 1).show();
}
@Override
protected void onDestroy() {
// TODO Auto-generated method stub
super.onDestroy();
Toast.makeText(this, "onDestroy", 1).show();
}
@Override
protected void onStop() {
// TODO Auto-generated method stub super.onStop();
Toast.makeText(this, "onStop", 1).show();
}
Please help me,...