Я совершенно новый для Android-разработки, и это первый день, когда я когда-либо касался студии Android. Я реализую приложение для заметок, в котором есть страница настроек, которая помогает пользователям изменять цвет текста. На странице настроек есть 3 переключателя (3 цвета), содержащихся в группе радио, и кнопка сохранения, чтобы сохранить настройки. Когда нажата кнопка сохранения, она изменит цвет текста в другом файле layout/xml под названием NoteEditor. когда я попытался запустить приложение, я нажал кнопку «Сохранить». Я уже регистрирую класс настроек в AndroidManifest Пожалуйста, помогите !!Android-приложение остановилось при нажатии кнопки
Ниже мой код
Settings.Java
package com.example.sunny.mynote;
import android.app.Activity;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.Window;
import android.widget.Button;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TextView;
import android.widget.Toast;
import android.widget.EditText;
/**
* Created by Sunny on 19/04/2015.
*/
public class Settings extends Activity {
private RadioGroup RadioGroup1;
private RadioButton rdbRed, rdbBlue, rdbOrange;
private Button btnSave;
private EditText textView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_ACTION_BAR);
setContentView(R.layout.settings);
View view = LayoutInflater.from(getApplication()).inflate(R.layout.settings, null);
RadioGroup1 = (RadioGroup) findViewById(R.id.RadioGroup1);
RadioGroup1.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup group, int checkedId) {
if(checkedId == R.id.rdbRed)
{
Toast.makeText(getApplicationContext(), "choice: Red",
Toast.LENGTH_SHORT).show();
RadioGroup1.check(R.id.rdbRed);
}
else if(checkedId == R.id.rdbBlue)
{
Toast.makeText(getApplicationContext(), "choice: Blue",
Toast.LENGTH_SHORT).show();
RadioGroup1.check(R.id.rdbBlue);
}
else
{
Toast.makeText(getApplicationContext(), "choice: Orange",
Toast.LENGTH_SHORT).show();
RadioGroup1.check(R.id.rdbOrange);
}
}
});
rdbRed = (RadioButton) findViewById(R.id.rdbRed);
rdbBlue = (RadioButton) findViewById(R.id.rdbBlue);
rdbOrange = (RadioButton) findViewById(R.id.rdbOrange);
textView = (EditText) findViewById(R.id.noteText);
btnSave = (Button)findViewById(R.id.btn_Save);
btnSave.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
int selectedId = RadioGroup1.getCheckedRadioButtonId();
if(selectedId == rdbRed.getId()) {
String color1 = String.valueOf(Color.parseColor("#FF0000"));
String color2 = String.valueOf(Color.parseColor("#FF0000"));
String color3 = String.valueOf(Color.parseColor("#FF0000"));
Intent intent = new Intent(this, NoteEditorActivity.class);
intent.putExtra("textValue", color1);
intent.putExtra("textValue1", color2);
intent.putExtra("textValue2", color3);
startActivity(intent);
} else if(selectedId == rdbBlue.getId()) {
textView.setTextColor(Color.parseColor("#0066FF"));
} else {
textView.setTextColor(Color.parseColor("#FF6600"));
}
}
});
}
@Override
public void onBackPressed() {
super.onBackPressed();
finish();
}
}
NoteEditorActivity.Java
package com.example.sunny.mynote;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.MenuItem;
import android.widget.EditText;
import com.example.sunny.mynote.com.example.sunny.mynote.data.NoteItem;
/**
* Created by Sunny on 19/04/2015.
*/
public class NoteEditorActivity extends Activity {
private NoteItem note;
private String textValue1;
private String textValue2;
private String textValue3;
EditText textView = (EditText) findViewById(R.id.noteText);
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_note_editor);
getActionBar().setDisplayHomeAsUpEnabled(true);
Intent intent = this.getIntent();
note = new NoteItem();
note.setKey(intent.getStringExtra("key"));
note.setText(intent.getStringExtra("text"));
EditText et = (EditText) findViewById(R.id.noteText);
et.setText(note.getText());
et.setSelection(note.getText().length());
//Intent intent = getIntent();
textValue1 = intent.getStringExtra("textValue");
textValue2 = intent.getStringExtra("textValue1");
textValue3 = intent.getStringExtra("textValue2");
if(textValue1 != null){
textView.setText(textValue1);
}
else if (textValue2 != null){
textView.setText(textValue2);
}
else {
textView.setText(textValue3);
}
}
private void saveAndFinish()
{
EditText et = (EditText) findViewById(R.id.noteText);
String noteText = et.getText().toString();
Intent intent = new Intent();
intent.putExtra("key", note.getKey());
intent.putExtra("text", noteText);
setResult(RESULT_OK, intent);
finish();
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == android.R.id.home)
{
saveAndFinish();
}
return false;
}
@Override
public void onBackPressed() {
saveAndFinish();
}
}
Logcat
04-22 20:45:11.283 30609-30609/com.example.sunny.mynote D/AbsListView﹕ Get MotionRecognitionManager
04-22 20:45:11.303 30609-30609/com.example.sunny.mynote D/AbsListView﹕ unregisterIRListener() is called
04-22 20:45:11.353 30609-30609/com.example.sunny.mynote D/AbsListView﹕ unregisterIRListener() is called
04-22 20:45:11.353 30609-30609/com.example.sunny.mynote D/AbsListView﹕ unregisterIRListener() is called
04-22 20:45:11.383 30609-30609/com.example.sunny.mynote D/AbsListView﹕ unregisterIRListener() is called
04-22 20:45:11.393 30609-30609/com.example.sunny.mynote D/AbsListView﹕ unregisterIRListener() is called
04-22 20:45:12.433 30609-30609/com.example.sunny.mynote D/AbsListView﹕ unregisterIRListener() is called
04-22 20:45:12.433 30609-30609/com.example.sunny.mynote D/AbsListView﹕ onDetachedFromWindow
04-22 20:45:12.433 30609-30609/com.example.sunny.mynote D/AbsListView﹕ unregisterIRListener() is called
04-22 20:45:12.443 30609-30609/com.example.sunny.mynote W/ApplicationPackageManager﹕ getCSCPackageItemText()
04-22 20:45:12.453 30609-30609/com.example.sunny.mynote E/MoreInfoHPW_ViewGroup﹕ Parent view is not a TextView
04-22 20:45:12.783 30609-30609/com.example.sunny.mynote D/AbsListView﹕ onVisibilityChanged() is called, visibility : 4
04-22 20:45:12.783 30609-30609/com.example.sunny.mynote D/AbsListView﹕ unregisterIRListener() is called
04-22 20:45:17.233 30609-30609/com.example.sunny.mynote D/AndroidRuntime﹕ Shutting down VM
04-22 20:45:17.233 30609-30609/com.example.sunny.mynote W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x417e0da0)
04-22 20:45:17.243 30609-30609/com.example.sunny.mynote E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.example.sunny.mynote, PID: 30609
java.lang.NullPointerException
at com.example.sunny.mynote.Settings.saveButtonPressed(Settings.java:36)
at com.example.sunny.mynote.Settings.access$100(Settings.java:19)
at com.example.sunny.mynote.Settings$2.onClick(Settings.java:84)
at android.view.View.performClick(View.java:4630)
at android.view.View$PerformClick.run(View.java:19339)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:157)
at android.app.ActivityThread.main(ActivityThread.java:5335)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
at dalvik.system.NativeStart.main(Native Method)
04-22 20:45:18.573 30609-30609/com.example.sunny.mynote I/Process﹕ Sending signal. PID: 30609 SIG: 9
04-22 20:45:18.633 31515-31515/com.example.sunny.mynote I/SELinux﹕ Function: selinux_android_load_priority [0], There is no sepolicy file.
04-22 20:45:18.653 31515-31515/com.example.sunny.mynote I/SELinux﹕ Function: selinux_android_load_priority , spota verifySig and checkHash pass. priority version is VE=SEPF_SM-N9005_4.4.2_0040
04-22 20:45:18.653 31515-31515/com.example.sunny.mynote I/SELinux﹕ selinux_android_seapp_context_reload: seapp_contexts file is loaded from /data/security/spota/seapp_contexts
04-22 20:45:18.653 31515-31515/com.example.sunny.mynote E/dalvikvm﹕ >>>>> Normal User
04-22 20:45:18.653 31515-31515/com.example.sunny.mynote E/dalvikvm﹕ >>>>> com.example.sunny.mynote [ userId:0 | appId:10383 ]
04-22 20:45:18.653 31515-31515/com.example.sunny.mynote D/dalvikvm﹕ Late-enabling CheckJNI
04-22 20:45:18.673 31515-31515/com.example.sunny.mynote I/dalvikvm﹕ Enabling JNI app bug workarounds for target SDK version 7...
04-22 20:45:18.743 31515-31515/com.example.sunny.mynote W/ApplicationPackageManager﹕ getCSCPackageItemText()
04-22 20:45:18.743 31515-31515/com.example.sunny.mynote I/PersonaManager﹕ getPersonaService() name persona_policy
04-22 20:45:18.783 31515-31515/com.example.sunny.mynote E/MoreInfoHPW_ViewGroup﹕ Parent view is not a TextView
04-22 20:45:18.813 31515-31515/com.example.sunny.mynote D/AndroidRuntime﹕ Shutting down VM
04-22 20:45:18.813 31515-31515/com.example.sunny.mynote W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x417e0da0)
04-22 20:45:18.813 31515-31515/com.example.sunny.mynote E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.example.sunny.mynote, PID: 31515
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.sunny.mynote/com.example.sunny.mynote.NoteEditorActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2292)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2350)
at android.app.ActivityThread.access$800(ActivityThread.java:163)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1257)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:157)
at android.app.ActivityThread.main(ActivityThread.java:5335)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at com.example.sunny.mynote.NoteEditorActivity.onCreate(NoteEditorActivity.java:53)
at android.app.Activity.performCreate(Activity.java:5389)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2256)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2350)
at android.app.ActivityThread.access$800(ActivityThread.java:163)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1257)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:157)
at android.app.ActivityThread.main(ActivityThread.java:5335)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
at dalvik.system.NativeStart.main(Native Method)
04-22 20:45:21.793 31515-31515/com.example.sunny.mynote I/Process﹕ Sending signal. PID: 31515 SIG: 9
04-22 20:45:22.033 31846-31846/com.example.sunny.mynote W/ApplicationPackageManager﹕ getCSCPackageItemText()
04-22 20:45:22.043 31846-31846/com.example.sunny.mynote I/PersonaManager﹕ getPersonaService() name persona_policy
04-22 20:45:22.093 31846-31846/com.example.sunny.mynote E/MoreInfoHPW_ViewGroup﹕ Parent view is not a TextView
04-22 20:45:22.103 31846-31846/com.example.sunny.mynote D/AbsListView﹕ Get MotionRecognitionManager
04-22 20:45:22.123 31846-31846/com.example.sunny.mynote D/AbsListView﹕ onVisibilityChanged() is called, visibility : 4
04-22 20:45:22.123 31846-31846/com.example.sunny.mynote D/AbsListView﹕ unregisterIRListener() is called
04-22 20:45:22.143 31846-31846/com.example.sunny.mynote D/AbsListView﹕ onVisibilityChanged() is called, visibility : 0
04-22 20:45:22.143 31846-31846/com.example.sunny.mynote D/AbsListView﹕ unregisterIRListener() is called
04-22 20:45:22.153 31846-31846/com.example.sunny.mynote D/AbsListView﹕ unregisterIRListener() is called
04-22 20:45:22.173 31846-31846/com.example.sunny.mynote D/AbsListView﹕ unregisterIRListener() is called
04-22 20:45:22.173 31846-31846/com.example.sunny.mynote D/AbsListView﹕ unregisterIRListener() is called
04-22 20:45:22.203 31846-31846/com.example.sunny.mynote D/AbsListView﹕ unregisterIRListener() is called
04-22 20:45:23.623 31846-31846/com.example.sunny.mynote D/AbsListView﹕ Get MotionRecognitionManager
04-22 20:45:23.643 31846-31846/com.example.sunny.mynote D/AbsListView﹕ unregisterIRListener() is called
04-22 20:45:23.713 31846-31846/com.example.sunny.mynote D/AbsListView﹕ unregisterIRListener() is called
04-22 20:45:23.713 31846-31846/com.example.sunny.mynote D/AbsListView﹕ unregisterIRListener() is called
04-22 20:45:23.733 31846-31846/com.example.sunny.mynote D/AbsListView﹕ unregisterIRListener() is called
04-22 20:45:23.763 31846-31846/com.example.sunny.mynote D/AbsListView﹕ unregisterIRListener() is called
04-22 20:45:24.723 31846-31846/com.example.sunny.mynote D/AbsListView﹕ unregisterIRListener() is called
04-22 20:45:24.723 31846-31846/com.example.sunny.mynote D/AbsListView﹕ onDetachedFromWindow
04-22 20:45:24.723 31846-31846/com.example.sunny.mynote D/AbsListView﹕ unregisterIRListener() is called
04-22 20:45:24.723 31846-31846/com.example.sunny.mynote W/ApplicationPackageManager﹕ getCSCPackageItemText()
04-22 20:45:24.743 31846-31846/com.example.sunny.mynote E/MoreInfoHPW_ViewGroup﹕ Parent view is not a TextView
04-22 20:45:25.073 31846-31846/com.example.sunny.mynote D/AbsListView﹕ onVisibilityChanged() is called, visibility : 4
04-22 20:45:25.073 31846-31846/com.example.sunny.mynote D/AbsListView﹕ unregisterIRListener() is called
04-22 20:45:26.593 31846-31846/com.example.sunny.mynote D/AndroidRuntime﹕ Shutting down VM
04-22 20:45:26.593 31846-31846/com.example.sunny.mynote W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x417e0da0)
04-22 20:45:26.593 31846-31846/com.example.sunny.mynote E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.example.sunny.mynote, PID: 31846
java.lang.NullPointerException
at com.example.sunny.mynote.Settings.saveButtonPressed(Settings.java:36)
at com.example.sunny.mynote.Settings.access$100(Settings.java:19)
at com.example.sunny.mynote.Settings$2.onClick(Settings.java:84)
at android.view.View.performClick(View.java:4630)
at android.view.View$PerformClick.run(View.java:19339)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:157)
at android.app.ActivityThread.main(ActivityThread.java:5335)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
at dalvik.system.NativeStart.main(Native Method)
04-22 20:45:31.993 31846-31846/com.example.sunny.mynote I/Process﹕ Sending signal. PID: 31846 SIG: 9
04-22 20:45:32.193 32455-32455/com.example.sunny.mynote W/ApplicationPackageManager﹕ getCSCPackageItemText()
04-22 20:45:32.193 32455-32455/com.example.sunny.mynote I/PersonaManager﹕ getPersonaService() name persona_policy
04-22 20:45:32.223 32455-32455/com.example.sunny.mynote E/MoreInfoHPW_ViewGroup﹕ Parent view is not a TextView
04-22 20:45:32.243 32455-32455/com.example.sunny.mynote D/AbsListView﹕ Get MotionRecognitionManager
04-22 20:45:32.253 32455-32455/com.example.sunny.mynote D/AbsListView﹕ onVisibilityChanged() is called, visibility : 4
04-22 20:45:32.253 32455-32455/com.example.sunny.mynote D/AbsListView﹕ unregisterIRListener() is called
04-22 20:45:32.263 32455-32455/com.example.sunny.mynote D/AbsListView﹕ onVisibilityChanged() is called, visibility : 0
04-22 20:45:32.263 32455-32455/com.example.sunny.mynote D/AbsListView﹕ unregisterIRListener() is called
04-22 20:45:32.273 32455-32455/com.example.sunny.mynote D/AbsListView﹕ unregisterIRListener() is called
04-22 20:45:32.293 32455-32455/com.example.sunny.mynote D/AbsListView﹕ unregisterIRListener() is called
04-22 20:45:32.313 32455-32455/com.example.sunny.mynote D/AbsListView﹕ unregisterIRListener() is called
04-22 20:45:32.323 32455-32455/com.example.sunny.mynote D/AbsListView﹕ unregisterIRListener() is called
04-22 20:45:33.533 32455-32455/com.example.sunny.mynote D/AbsListView﹕ Get MotionRecognitionManager
04-22 20:45:33.553 32455-32455/com.example.sunny.mynote D/AbsListView﹕ unregisterIRListener() is called
04-22 20:45:33.603 32455-32455/com.example.sunny.mynote D/AbsListView﹕ unregisterIRListener() is called
04-22 20:45:33.603 32455-32455/com.example.sunny.mynote D/AbsListView﹕ unregisterIRListener() is called
04-22 20:45:33.643 32455-32455/com.example.sunny.mynote D/AbsListView﹕ unregisterIRListener() is called
04-22 20:45:33.643 32455-32455/com.example.sunny.mynote D/AbsListView﹕ unregisterIRListener() is called
04-22 20:45:34.423 32455-32455/com.example.sunny.mynote D/AbsListView﹕ unregisterIRListener() is called
04-22 20:45:34.423 32455-32455/com.example.sunny.mynote D/AbsListView﹕ onDetachedFromWindow
04-22 20:45:34.423 32455-32455/com.example.sunny.mynote D/AbsListView﹕ unregisterIRListener() is called
04-22 20:45:34.433 32455-32455/com.example.sunny.mynote W/ApplicationPackageManager﹕ getCSCPackageItemText()
04-22 20:45:34.443 32455-32455/com.example.sunny.mynote E/MoreInfoHPW_ViewGroup﹕ Parent view is not a TextView
04-22 20:45:34.753 32455-32455/com.example.sunny.mynote D/AbsListView﹕ onVisibilityChanged() is called, visibility : 4
04-22 20:45:34.753 32455-32455/com.example.sunny.mynote D/AbsListView﹕ unregisterIRListener() is called
04-22 20:45:38.373 32455-32455/com.example.sunny.mynote D/AndroidRuntime﹕ Shutting down VM
04-22 20:45:38.373 32455-32455/com.example.sunny.mynote W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x417e0da0)
04-22 20:45:38.373 32455-32455/com.example.sunny.mynote E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.example.sunny.mynote, PID: 32455
java.lang.NullPointerException
at com.example.sunny.mynote.Settings.saveButtonPressed(Settings.java:36)
at com.example.sunny.mynote.Settings.access$100(Settings.java:19)
at com.example.sunny.mynote.Settings$2.onClick(Settings.java:84)
at android.view.View.performClick(View.java:4630)
at android.view.View$PerformClick.run(View.java:19339)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:157)
at android.app.ActivityThread.main(ActivityThread.java:5335)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
at dalvik.system.NativeStart.main(Native Method)
04-22 20:45:39.763 32455-32455/com.example.sunny.mynote I/Process﹕ Sending signal. PID: 32455 SIG: 9
04-22 20:45:39.953 32526-32526/com.example.sunny.mynote W/ApplicationPackageManager﹕ getCSCPackageItemText()
04-22 20:45:39.953 32526-32526/com.example.sunny.mynote I/PersonaManager﹕ getPersonaService() name persona_policy
04-22 20:45:39.973 32526-32526/com.example.sunny.mynote E/MoreInfoHPW_ViewGroup﹕ Parent view is not a TextView
04-22 20:45:40.003 32526-32526/com.example.sunny.mynote D/AndroidRuntime﹕ Shutting down VM
04-22 20:45:40.003 32526-32526/com.example.sunny.mynote W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x417e0da0)
04-22 20:45:40.003 32526-32526/com.example.sunny.mynote E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.example.sunny.mynote, PID: 32526
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.sunny.mynote/com.example.sunny.mynote.NoteEditorActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2292)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2350)
at android.app.ActivityThread.access$800(ActivityThread.java:163)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1257)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:157)
at android.app.ActivityThread.main(ActivityThread.java:5335)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at com.example.sunny.mynote.NoteEditorActivity.onCreate(NoteEditorActivity.java:53)
at android.app.Activity.performCreate(Activity.java:5389)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2256)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2350)
at android.app.ActivityThread.access$800(ActivityThread.java:163)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1257)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:157)
at android.app.ActivityThread.main(ActivityThread.java:5335)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
at dalvik.system.NativeStart.main(Native Method)
Можете ли вы просто ввести журнал ошибок, а не все лог-код, чтобы было легко понять, где это неправильно. – Codelord
, пожалуйста, напишите полный [logcat] (https://politecuriosity.files.wordpress.com/2013/05/logcat.jpg). – Gattsu
есть ли текстовое изображение в настройке.xml ?? Пожалуйста, напишите settings.xml – Jaydeep