Text in editText abspeichern und auslesen

  • 30 Antworten
  • Neuester Beitrag
Diskutiere Text in editText abspeichern und auslesen im Android App Entwicklung im Bereich Betriebssysteme & Apps.
K

kingfatih58

Neues Mitglied
Hallo,
ich bin gerade dabei eine App zu erstellen womit ich Texte abspeichern und beim nächsten app start auslesen kann. Wie kann ich es machen, dass meine App die Texte in den einzelnen editText Elemente abspeichert und beim nächsten start ausliest?
Mit freundlichen Grüßen
 
Jaiel

Jaiel

Experte
Sharedpreferences, Files oder Datenbanken.
Es gibt auch unübliche Workarounds die aber nicht sicher sind oder anderweitig weit hergeholt
und ich füge das nur hinzu weil ich das schonmal erlebt habe:

-Services die die Strings solange halten bis die Activity diese wieder erfragt
-Die Strings auf einem Webserver speichern und beizeiten erfragen(nicht so wiethergeholt aber abhängig von den anforderungen der app)
....
 
K

kingfatih58

Neues Mitglied
Danke für deine hilfe aber wie gehe ich jetzt am besten vor?
 
K

kingfatih58

Neues Mitglied
ich habe mir da jetzt paar Sachen zusammen kopiert. Wieso klappt es aber nicht?
Code:
import android.app.Activity;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;

public class Montag extends Activity implements OnClickListener {

    CheckBox checkBox;
    EditText editText;
    Button button;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        // TODO Auto-generated method stub
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_montag);

        checkBox = (CheckBox) findViewById(R.id.checkBox);
        editText = (EditText) findViewById(R.id.editText);
        button = (Button) findViewById(R.id.buttonspeichern);
        button.setOnClickListener(this);
        loadSavedPreferences();
    }

    private void loadSavedPreferences() {
        SharedPreferences sp = PreferenceManager
                .getDefaultSharedPreferences(this);
        boolean cbValue = sp.getBoolean("CHECKBOX", false);
        String name = sp.getString("NAME", "YourName");
        if (cbValue) {
            checkBox.setChecked(true);
        } else {
            checkBox.setChecked(false);
        }

        editText.setText(name);
    }

    private void savePreferences(String key, boolean value) {
        SharedPreferences sp = PreferenceManager
                .getDefaultSharedPreferences(this);
        Editor edit = sp.edit();
        edit.putBoolean(key, value);
        edit.commit();
    }

    private void savePreferences(String key, String value) {
        SharedPreferences sp = PreferenceManager
                .getDefaultSharedPreferences(this);
        Editor edit = sp.edit();
        edit.putString(key, value);
        edit.commit();
    }

    @Override
    public void onClick(View v) {
        // TODO Auto-generated method stub
        savePreferences("CHECKBOX", checkBox.isChecked());
        if (checkBox.isChecked())
            savePreferences("NAME", editText.getText().toString());

        finish();
    }

}
 
Jaiel

Jaiel

Experte
Ich guck es mir mal an aber möchte schon mal antworten:

Es hat vor Allem nciht funktioniert weil

ich habe mir da jetzt paar Sachen zusammen kopiert
 
K

kingfatih58

Neues Mitglied
Danke. Ja ich habe mir die Seiten die du mir geschickt hast angeguckt, aber weit bin ich nicht gekommen.
 
Jaiel

Jaiel

Experte
So sollte es klappen:

PHP:
import android.app.Activity;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;

public class Montag extends Activity implements OnClickListener {

    CheckBox checkBox;
    EditText editText;
    Button button;
    SharedPreferences sp;//hier verändert

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        // TODO Auto-generated method stub
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_montag);

        checkBox = (CheckBox) findViewById(R.id.checkBox);
        editText = (EditText) findViewById(R.id.editText);
        button = (Button) findViewById(R.id.buttonspeichern);
        button.setOnClickListener(this);

        sp=getSharedPreferences("myPrefs",0);//hier verändert

        loadSavedPreferences();
    }

    private void loadSavedPreferences() {

        boolean cbValue = sp.getBoolean("CHECKBOX", false);
        String name = sp.getString("NAME", "YourName");
        if (cbValue) {
            checkBox.setChecked(true);
        } else {
            checkBox.setChecked(false);
        }

        editText.setText(name);
    }

    private void savePreferences(String key, boolean value) {       
        SharedPreferences.Editor edit = sp.edit();//hier verändert
        edit.putBoolean(key, value);
        edit.commit();
    }

    private void savePreferences(String key, String value) {
        SharedPreferences.Editor edit = sp.edit();//hier verändert
        edit.putString(key, value);
        edit.commit();
    }

    @Override
    public void onClick(View v) {
        // TODO Auto-generated method stub
        savePreferences("CHECKBOX", checkBox.isChecked());
        if (checkBox.isChecked())
            savePreferences("NAME", editText.getText().toString());

        finish();
    }

}
PS : ich würde die Preferences in onDestroy() setzen wenn du sie nur einmal am Anfang auslesen musst wenn die Activity startet
 
K

kingfatih58

Neues Mitglied
so stürzt die App aber ab wenn ich auf speichern drücke
 
Jaiel

Jaiel

Experte
stürzt sie ab mit einem Hinweis oder beendet sie sich? Da du in onClick ein finish() stehen hast.

Freunde dich langsam mal mit dem LogCat an und poste in Zukunft bei Fehler den Logcat gleich mit...
 
K

kingfatih58

Neues Mitglied
Wo finde ich denn den logcat? Den emulator kann ich nicht starten daher das ich HAXM nicht installieren kann.

Die app stürzt ab auch ohne finish()
 
Zuletzt bearbeitet:
I

{I-love-Android}

Ambitioniertes Mitglied
Hast du denn keine echte Hardware auf der du das testen kannst ?
 
K

kingfatih58

Neues Mitglied
Nein kannst du mir eine Empfehlen?
 
Jaiel

Jaiel

Experte
kommt darauf an wieviel du ausgeben willst :D
 
K

kingfatih58

Neues Mitglied
sollte nicht zu viel sein aber tun was es tun soll. Das würde mir reichen, da ich die Apps sowieso auf einem Android gerät ausprobiere. Brauche es also nur für den Logcat
 
X

xTheRealSchlawizzle

Neues Mitglied
Ich glaube damit ist ein Android-Gerät gemeint :D
 
K

kingfatih58

Neues Mitglied
Achso ja habe paar Geräte da: s2, s3 und s5 wie komme ich denn dort in die logs rein?

Konnte jetzt durch eine App in die Logs zugreifen hoffe sind die richtigen:
Code:
--------- beginning of /dev/log/main
E/SpannableStringBuilder(15326): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
E/SpannableStringBuilder(15326): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
D/dalvikvm(15326): GC_FOR_ALLOC freed 1411K, 24% free 9744K/12679K, paused 42ms, total 43ms
E/SpannableStringBuilder(15326): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
E/SpannableStringBuilder(15326): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
D/dalvikvm(15326): GC_CONCURRENT freed 333K, 23% free 9824K/12679K, paused 21ms+2ms, total 54ms
D/dalvikvm(15326): WAIT_FOR_CONCURRENT_GC blocked 34ms
E/SpannableStringBuilder(15326): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
E/SpannableStringBuilder(15326): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
D/dalvikvm(15326): GC_CONCURRENT freed 33K, 20% free 10187K/12679K, paused 2ms+2ms, total 35ms
D/dalvikvm(15326): GC_CONCURRENT freed 44K, 17% free 10591K/12679K, paused 12ms+2ms, total 33ms
D/dalvikvm(15326): WAIT_FOR_CONCURRENT_GC blocked 15ms
D/dalvikvm(15326): GC_CONCURRENT freed 408K, 16% free 10668K/12679K, paused 10ms+2ms, total 119ms
D/dalvikvm(15326): WAIT_FOR_CONCURRENT_GC blocked 4ms
D/dalvikvm(15326): GC_FOR_ALLOC freed 435K, 16% free 10700K/12679K, paused 16ms, total 17ms
D/dalvikvm(15326): GC_CONCURRENT freed 360K, 16% free 10774K/12679K, paused 12ms+2ms, total 31ms
 
Zuletzt bearbeitet:
I

{I-love-Android}

Ambitioniertes Mitglied
Du liest logcat mit einer App aus ? Das macht man eigentlich so:
Android Studio öffnen , Handy verbinden , die App mit Android Studio ausführen und dann dein Handy wählen, wenn sie dann auf deinem Handy gestartet ist findest du ziemlich am unteren Rand von AS einen Reiter mit Logcat , da klick drauf und schon siehst du es in Echtzeit, auf deinem Handy kannst du jetzt was testen und falls die App dann abstürzt kannst du sofort die genaue Ursache im Logcat auslesen...

Falls ich dir damit helfen konnte würde ich mich über einen Klick auf den Danke Button freuen :)

Lg , Moonfire
 
Jaiel

Jaiel

Experte
Ich glaube er hat erwähnt dass sein EMulator nciht mitmacht. Obwohl das bestimmt einfach zu lösen ist.


@Threadersteller wie hast du denn bisher deine Apps ausgeführt? Über USB Debugging oder immer wieder eien signierte APK daei erstellt und auf handy geladen?

Der LogCat sollte eigenltich automatisch schon da sein.
Wenn nciht finde ihn in den Menüs....oder gib in der Suchen oder Hilfe leiste LogCat ein das findet dir das Programm shcon. Wenn du ein seltener Fall bist müsstest du dir das evtl nochmal downloaden aber meistens ist das schon integriert
 
K

kingfatih58

Neues Mitglied
so habe es mit dem genymotion gemacht. Hier sind die Logs:
Code:
07-30 12:17:02.158    1058-1058/? D/AndroidRuntime? >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
07-30 12:17:02.158    1058-1058/? D/AndroidRuntime? CheckJNI is OFF
07-30 12:17:02.162    1058-1058/? D/dalvikvm? Unable to stat classpath element '/system/framework/filterfw.jar'
07-30 12:17:02.166    1058-1058/? D/dalvikvm? Trying to load lib libjavacore.so 0x0
07-30 12:17:02.166    1058-1058/? D/dalvikvm? Added shared lib libjavacore.so 0x0
07-30 12:17:02.170    1058-1058/? D/dalvikvm? Trying to load lib libnativehelper.so 0x0
07-30 12:17:02.170    1058-1058/? D/dalvikvm? Added shared lib libnativehelper.so 0x0
07-30 12:17:02.218    1058-1058/? D/AndroidRuntime? Calling main entry com.android.commands.am.Am
07-30 12:17:02.218    1058-1058/? D/AndroidRuntime? Shutting down VM
    --------- beginning of /dev/log/system
07-30 12:17:02.218      318-553/? I/ActivityManager? Force stopping package com.bb.test.planapp uid=10048
07-30 12:17:02.350    1058-1065/? I/AndroidRuntime? NOTE: attach of thread 'Binder_1' failed
07-30 12:17:02.350    1058-1062/? D/dalvikvm? GC_CONCURRENT freed 94K, 90% free 442K/4096K, paused 0ms+0ms, total 129ms
07-30 12:17:02.350    1058-1064/? D/jdwp? Got wake-up signal, bailing out of select
07-30 12:17:02.350    1058-1064/? D/dalvikvm? Debugger has detached; object registry had 0 entries
07-30 12:17:02.818    1068-1068/? D/AndroidRuntime? >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
07-30 12:17:02.818    1068-1068/? D/AndroidRuntime? CheckJNI is OFF
07-30 12:17:02.822    1068-1068/? D/dalvikvm? Unable to stat classpath element '/system/framework/filterfw.jar'
07-30 12:17:02.826    1068-1068/? D/dalvikvm? Trying to load lib libjavacore.so 0x0
07-30 12:17:02.830    1068-1068/? D/dalvikvm? Added shared lib libjavacore.so 0x0
07-30 12:17:02.830    1068-1068/? D/dalvikvm? Trying to load lib libnativehelper.so 0x0
07-30 12:17:02.830    1068-1068/? D/dalvikvm? Added shared lib libnativehelper.so 0x0
07-30 12:17:02.938    1068-1068/? D/AndroidRuntime? Calling main entry com.android.commands.am.Am
07-30 12:17:02.942      318-318/? I/ActivityManager? START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.bb.test.planapp/.planapp u=0} from pid 1068
07-30 12:17:03.314      120-160/? E/SocketStream? readFully was waiting for 352360 bytes, got 16192
07-30 12:17:03.314      120-160/? E/SocketStream? readFully was waiting for 336168 bytes, got 16192
07-30 12:17:03.314      120-160/? E/SocketStream? readFully was waiting for 319976 bytes, got 16192
07-30 12:17:03.314      120-160/? E/SocketStream? readFully was waiting for 303784 bytes, got 16192
07-30 12:17:03.314      120-160/? E/SocketStream? readFully was waiting for 287592 bytes, got 16192
07-30 12:17:03.314      120-160/? E/SocketStream? readFully was waiting for 271400 bytes, got 16192
07-30 12:17:03.314      120-160/? E/SocketStream? readFully was waiting for 255208 bytes, got 16192
07-30 12:17:03.314      120-160/? E/SocketStream? readFully was waiting for 239016 bytes, got 16192
07-30 12:17:03.314      120-160/? E/SocketStream? readFully was waiting for 222824 bytes, got 16192
07-30 12:17:03.314      120-160/? E/SocketStream? readFully was waiting for 206632 bytes, got 16192
07-30 12:17:03.318      120-160/? E/SocketStream? readFully was waiting for 190440 bytes, got 16192
07-30 12:17:03.318      120-160/? E/SocketStream? readFully was waiting for 174248 bytes, got 16192
07-30 12:17:03.318      120-160/? E/SocketStream? readFully was waiting for 158056 bytes, got 16192
07-30 12:17:03.318      120-160/? E/SocketStream? readFully was waiting for 141864 bytes, got 14344
07-30 12:17:03.318      120-160/? E/SocketStream? readFully was waiting for 127520 bytes, got 16192
07-30 12:17:03.318      120-160/? E/SocketStream? readFully was waiting for 111328 bytes, got 16192
07-30 12:17:03.318      120-160/? E/SocketStream? readFully was waiting for 95136 bytes, got 16192
07-30 12:17:03.318      120-160/? E/SocketStream? readFully was waiting for 78944 bytes, got 16192
07-30 12:17:03.318      120-160/? E/SocketStream? readFully was waiting for 62752 bytes, got 16192
07-30 12:17:03.318      120-160/? E/SocketStream? readFully was waiting for 46560 bytes, got 16192
07-30 12:17:03.318      120-160/? E/SocketStream? readFully was waiting for 30368 bytes, got 16192
07-30 12:17:03.334      318-318/? D/dalvikvm? GC_FOR_ALLOC freed 399K, 21% free 8588K/10759K, paused 12ms, total 12ms
07-30 12:17:03.358    1068-1068/? D/AndroidRuntime? Shutting down VM
07-30 12:17:03.362    1068-1072/? D/dalvikvm? GC_CONCURRENT freed 101K, 89% free 480K/4096K, paused 0ms+0ms, total 1ms
07-30 12:17:03.362    1068-1074/? D/jdwp? Got wake-up signal, bailing out of select
07-30 12:17:03.362    1068-1074/? D/dalvikvm? Debugger has detached; object registry had 1 entries
07-30 12:17:03.362    1077-1077/? D/dalvikvm? Late-enabling CheckJNI
07-30 12:17:03.362    1068-1079/? I/AndroidRuntime? NOTE: attach of thread 'Binder_3' failed
07-30 12:17:03.362      318-540/? I/ActivityManager? Start proc com.bb.test.planapp for activity com.bb.test.planapp/.planapp: pid=1077 uid=10048 gids={1028}
07-30 12:17:03.398      318-378/? I/qtaguid? Failed write_ctrl(s 1 10048) res=-1 errno=1
07-30 12:17:03.398      318-378/? W/NetworkManagementSocketTagger? setKernelCountSet(10048, 1) failed with errno -1
07-30 12:17:03.470    1077-1077/? I/dalvikvm? Could not find method android.view.ViewGroup.onRtlPropertiesChanged, referenced from method android.support.v7.widget.Toolbar.onRtlPropertiesChanged
07-30 12:17:03.474    1077-1077/? W/dalvikvm? VFY: unable to resolve virtual method 13112: Landroid/view/ViewGroup;.onRtlPropertiesChanged (I)V
07-30 12:17:03.474    1077-1077/? D/dalvikvm? VFY: replacing opcode 0x6f at 0x0007
07-30 12:17:03.474    1077-1077/? I/dalvikvm? Could not find method android.content.res.TypedArray.getChangingConfigurations, referenced from method android.support.v7.internal.widget.TintTypedArray.getChangingConfigurations
07-30 12:17:03.474    1077-1077/? W/dalvikvm? VFY: unable to resolve virtual method 411: Landroid/content/res/TypedArray;.getChangingConfigurations ()I
07-30 12:17:03.474    1077-1077/? D/dalvikvm? VFY: replacing opcode 0x6e at 0x0002
07-30 12:17:03.474    1077-1077/? I/dalvikvm? Could not find method android.content.res.TypedArray.getType, referenced from method android.support.v7.internal.widget.TintTypedArray.getType
07-30 12:17:03.474    1077-1077/? W/dalvikvm? VFY: unable to resolve virtual method 433: Landroid/content/res/TypedArray;.getType (I)I
07-30 12:17:03.474    1077-1077/? D/dalvikvm? VFY: replacing opcode 0x6e at 0x0002
07-30 12:17:03.598    1077-1077/? D/dalvikvm? GC_FOR_ALLOC freed 171K, 17% free 6129K/7367K, paused 3ms, total 4ms
07-30 12:17:03.598    1077-1077/? I/dalvikvm-heap? Grow heap (frag case) to 7.665MB for 684876-byte allocation
07-30 12:17:03.690    1077-1081/? D/dalvikvm? GC_CONCURRENT freed 4K, 16% free 6794K/8071K, paused 88ms+0ms, total 91ms
07-30 12:17:03.814      475-475/? D/OpenGLRenderer? TextureCache::flush: target size: 302553
07-30 12:17:03.814      475-475/? D/OpenGLRenderer? TextureCache::callback: name, removed size, mSize = 20, 13312, 490944
07-30 12:17:03.814      475-475/? D/OpenGLRenderer? TextureCache::callback: name, removed size, mSize = 2, 9216, 481728
07-30 12:17:03.814      475-475/? D/OpenGLRenderer? TextureCache::callback: name, removed size, mSize = 25, 20736, 460992
07-30 12:17:03.814      475-475/? D/OpenGLRenderer? TextureCache::callback: name, removed size, mSize = 26, 153664, 307328
07-30 12:17:03.814      475-475/? D/OpenGLRenderer? TextureCache::callback: name, removed size, mSize = 27, 153664, 153664
07-30 12:17:03.954    1077-1077/? D/libEGL? loaded /system/lib/egl/libEGL_genymotion.so
07-30 12:17:04.018    1077-1077/? D/? HostConnection::get() New Host Connection established 0xb964d510, tid 1077
07-30 12:17:04.058    1077-1077/? D/libEGL? loaded /system/lib/egl/libGLESv1_CM_genymotion.so
07-30 12:17:04.058    1077-1077/? D/libEGL? loaded /system/lib/egl/libGLESv2_genymotion.so
07-30 12:17:04.166    1077-1077/? W/EGL_genymotion? eglSurfaceAttrib not implemented
07-30 12:17:04.178    1077-1077/? D/OpenGLRenderer? Enabling debug mode 0
07-30 12:17:04.322    1077-1077/? D/OpenGLRenderer? TextureCache::get: create texture(0xb966e710): name, size, mSize = 1, 684864, 684864
07-30 12:17:04.414    1077-1077/? D/OpenGLRenderer? TextureCache::get: create texture(0xb966d1e8): name, size, mSize = 2, 4, 684868
07-30 12:17:04.438    1077-1077/? D/OpenGLRenderer? TextureCache::get: create texture(0xb9660b48): name, size, mSize = 4, 1024, 685892
07-30 12:17:04.446    1077-1077/? D/OpenGLRenderer? TextureCache::get: create texture(0xb964d7b0): name, size, mSize = 6, 2304, 688196
07-30 12:17:04.522      318-349/? I/ActivityManager? Displayed com.bb.test.planapp/.planapp: +1s165ms
07-30 12:17:04.602      318-378/? I/qtaguid? Failed write_ctrl(s 0 10021) res=-1 errno=1
07-30 12:17:04.602      318-378/? W/NetworkManagementSocketTagger? setKernelCountSet(10021, 0) failed with errno -1
07-30 12:17:05.758    1077-1077/? D/OpenGLRenderer? TextureCache::get: create texture(0xb9687c18): name, size, mSize = 25, 144, 688340
07-30 12:17:05.806    1077-1077/? I/dalvikvm? Could not find method android.content.res.Resources.getDrawable, referenced from method android.support.v7.internal.widget.ResourcesWrapper.getDrawable
07-30 12:17:05.806    1077-1077/? W/dalvikvm? VFY: unable to resolve virtual method 374: Landroid/content/res/Resources;.getDrawable (ILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
07-30 12:17:05.810    1077-1077/? D/dalvikvm? VFY: replacing opcode 0x6e at 0x0002
07-30 12:17:05.810    1077-1077/? I/dalvikvm? Could not find method android.content.res.Resources.getDrawableForDensity, referenced from method android.support.v7.internal.widget.ResourcesWrapper.getDrawableForDensity
07-30 12:17:05.810    1077-1077/? W/dalvikvm? VFY: unable to resolve virtual method 376: Landroid/content/res/Resources;.getDrawableForDensity (IILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
07-30 12:17:05.810    1077-1077/? D/dalvikvm? VFY: replacing opcode 0x6e at 0x0002
07-30 12:17:05.810      123-168/? W/genymotion_audio? out_write() limiting sleep time 46802 to 39909
07-30 12:17:05.910      123-337/? W/AudioWatchdog? Insufficient CPU for load: expected=50.0 actual=104.1 ms; underruns=13 logs=2
07-30 12:17:05.938      123-168/? W/genymotion_audio? out_write() limiting sleep time 59274 to 39909
07-30 12:17:05.942     443-1036/? E/BinaryDictionaryGetter? Could not find a dictionary pack
07-30 12:17:05.942     443-1036/? E/ActivityThread? Failed to find provider info for com.android.inputmethod.latin.dictionarypack
07-30 12:17:05.950      123-168/? W/genymotion_audio? out_write() limiting sleep time 49591 to 39909
07-30 12:17:05.962    1077-1077/? D/OpenGLRenderer? TextureCache::get: create texture(0xb9698060): name, size, mSize = 27, 528, 688868
07-30 12:17:05.994      123-168/? W/genymotion_audio? out_write() limiting sleep time 49546 to 39909
07-30 12:17:06.014    1077-1077/? D/OpenGLRenderer? TextureCache::get: create texture(0xb9639a58): name, size, mSize = 28, 4096, 692964
07-30 12:17:06.346      318-345/? E/Genymotion? Could not open '/sys/class/power_supply/genymotion_fake_path/present'
07-30 12:17:06.918      443-443/? V/InputMethodService? onEvaluateInputViewShown: config.hardKeyboardHidden = 1
07-30 12:17:06.918      443-443/? V/InputMethodService? onEvaluateInputViewShown: config.hardKeyboardHidden = 1
07-30 12:17:07.886    1077-1077/? D/OpenGLRenderer? TextureCache::get: create texture(0xb9668278): name, size, mSize = 32, 528, 693492
07-30 12:17:08.062    1077-1077/? D/OpenGLRenderer? TextureCache::get: create texture(0xb9649d90): name, size, mSize = 33, 100, 693592
07-30 12:17:09.286    1077-1077/? I/Choreographer? Skipped 140 frames!  The application may be doing too much work on its main thread.
07-30 12:17:09.286      318-354/? I/InputDispatcher? Window 'Window{536108fc com.bb.test.planapp/com.bb.test.planapp.planapp paused=false}' spent 2368.9ms processing the last input event: MotionEvent(action=7, deviceId=1, source=0x00001002)
07-30 12:17:09.446    1077-1077/? W/EGL_genymotion? eglSurfaceAttrib not implemented
07-30 12:17:09.962      443-443/? V/InputMethodService? onEvaluateInputViewShown: config.hardKeyboardHidden = 1
07-30 12:17:09.962      443-443/? V/InputMethodService? onEvaluateInputViewShown: config.hardKeyboardHidden = 1
07-30 12:17:10.010    1077-1077/? W/EGL_genymotion? eglSurfaceAttrib not implemented
07-30 12:17:10.022    1077-1077/? D/OpenGLRenderer? TextureCache::get: create texture(0xb968f670): name, size, mSize = 40, 10904, 704496
07-30 12:17:11.346      318-345/? E/Genymotion? Could not open '/sys/class/power_supply/genymotion_fake_path/present'
07-30 12:17:11.882    1077-1077/? D/OpenGLRenderer? TextureCache::get: create texture(0xb9653808): name, size, mSize = 47, 144, 704640
07-30 12:17:11.926    1077-1077/? D/OpenGLRenderer? TextureCache::get: create texture(0xb96487a8): name, size, mSize = 49, 4096, 708736
07-30 12:17:14.382    1077-1077/? D/AndroidRuntime? Shutting down VM
07-30 12:17:14.382    1077-1077/? W/dalvikvm? threadid=1: thread exiting with uncaught exception (group=0xa62c6288)
07-30 12:17:14.386      123-168/? W/genymotion_audio? out_write() limiting sleep time 46802 to 39909
07-30 12:17:14.386    1077-1077/? E/AndroidRuntime? FATAL EXCEPTION: main
    java.lang.IllegalStateException: Could not find a method save(View) in the activity class com.bb.test.planapp.planapp for onClick handler on view class android.support.v7.widget.AppCompatButton with id 'buttonspeichern'
            at android.view.View$1.onClick(View.java:3578)
            at android.view.View.performClick(View.java:4084)
            at android.view.View$PerformClick.run(View.java:16966)
            at android.os.Handler.handleCallback(Handler.java:615)
            at android.os.Handler.dispatchMessage(Handler.java:92)
            at android.os.Looper.loop(Looper.java:137)
            at android.app.ActivityThread.main(ActivityThread.java:4745)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
            at dalvik.system.NativeStart.main(Native Method)
     Caused by: java.lang.NoSuchMethodException: save [class android.view.View]
            at java.lang.Class.getConstructorOrMethod(Class.java:460)
            at java.lang.Class.getMethod(Class.java:915)
            at android.view.View$1.onClick(View.java:3571)
            at android.view.View.performClick(View.java:4084)
            at android.view.View$PerformClick.run(View.java:16966)
            at android.os.Handler.handleCallback(Handler.java:615)
            at android.os.Handler.dispatchMessage(Handler.java:92)
            at android.os.Looper.loop(Looper.java:137)
            at android.app.ActivityThread.main(ActivityThread.java:4745)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
            at dalvik.system.NativeStart.main(Native Method)
07-30 12:17:14.406    1077-1081/? D/dalvikvm? GC_CONCURRENT freed 168K, 16% free 7045K/8327K, paused 11ms+1ms, total 16ms
07-30 12:17:14.410      318-318/? W/ActivityManager? Force finishing activity com.bb.test.planapp/.planapp
07-30 12:17:14.434      120-160/? E/SocketStream? readFully was waiting for 352360 bytes, got 16192
07-30 12:17:14.434      120-160/? E/SocketStream? readFully was waiting for 336168 bytes, got 16192
07-30 12:17:14.434      120-160/? E/SocketStream? readFully was waiting for 319976 bytes, got 16192
07-30 12:17:14.434      120-160/? E/SocketStream? readFully was waiting for 303784 bytes, got 16192
07-30 12:17:14.434      120-160/? E/SocketStream? readFully was waiting for 287592 bytes, got 16192
07-30 12:17:14.434      120-160/? E/SocketStream? readFully was waiting for 271400 bytes, got 16192
07-30 12:17:14.434      120-160/? E/SocketStream? readFully was waiting for 255208 bytes, got 16192
07-30 12:17:14.434      120-160/? E/SocketStream? readFully was waiting for 239016 bytes, got 16192
07-30 12:17:14.434      120-160/? E/SocketStream? readFully was waiting for 222824 bytes, got 16192
07-30 12:17:14.434      120-160/? E/SocketStream? readFully was waiting for 206632 bytes, got 16192
07-30 12:17:14.434      120-160/? E/SocketStream? readFully was waiting for 190440 bytes, got 16192
07-30 12:17:14.434      120-160/? E/SocketStream? readFully was waiting for 174248 bytes, got 16192
07-30 12:17:14.434      120-160/? E/SocketStream? readFully was waiting for 158056 bytes, got 16192
07-30 12:17:14.434      120-160/? E/SocketStream? readFully was waiting for 141864 bytes, got 16192
07-30 12:17:14.434      120-160/? E/SocketStream? readFully was waiting for 125672 bytes, got 16192
07-30 12:17:14.434      120-160/? E/SocketStream? readFully was waiting for 109480 bytes, got 16192
07-30 12:17:14.434      120-160/? E/SocketStream? readFully was waiting for 93288 bytes, got 16192
07-30 12:17:14.434      120-160/? E/SocketStream? readFully was waiting for 77096 bytes, got 16192
07-30 12:17:14.434      120-160/? E/SocketStream? readFully was waiting for 60904 bytes, got 10764
07-30 12:17:14.434      120-160/? E/SocketStream? readFully was waiting for 50140 bytes, got 16192
07-30 12:17:14.434      120-160/? E/SocketStream? readFully was waiting for 33948 bytes, got 16192
07-30 12:17:14.434      120-160/? E/SocketStream? readFully was waiting for 17756 bytes, got 16192
07-30 12:17:14.450      318-318/? D/dalvikvm? GC_FOR_ALLOC freed 443K, 21% free 8605K/10759K, paused 11ms, total 11ms
07-30 12:17:14.954      318-331/? W/ActivityManager? Activity pause timeout for ActivityRecord{53614a08 com.bb.test.planapp/.planapp}
07-30 12:17:14.958      318-378/? I/qtaguid? Failed write_ctrl(s 1 10021) res=-1 errno=1
07-30 12:17:14.958      318-378/? W/NetworkManagementSocketTagger? setKernelCountSet(10021, 1) failed with errno -1
07-30 12:17:14.994      475-475/? W/EGL_genymotion? eglSurfaceAttrib not implemented
07-30 12:17:15.010      475-475/? D/dalvikvm? GC_FOR_ALLOC freed 332K, 19% free 7501K/9159K, paused 6ms, total 7ms
07-30 12:17:15.010      475-475/? D/OpenGLRenderer? TextureCache::get: create texture(0xb974d208): name, size, mSize = 36, 13312, 166976
07-30 12:17:15.014      475-475/? D/OpenGLRenderer? TextureCache::get: create texture(0xb9600450): name, size, mSize = 37, 9216, 176192
07-30 12:17:15.014      475-475/? D/OpenGLRenderer? TextureCache::get: create texture(0xb96a3ef0): name, size, mSize = 38, 20736, 196928
07-30 12:17:15.022      475-475/? D/OpenGLRenderer? TextureCache::get: create texture(0xb965d088): name, size, mSize = 39, 153664, 350592
07-30 12:17:15.030      475-475/? D/OpenGLRenderer? TextureCache::get: create texture(0xb9685c58): name, size, mSize = 40, 153664, 504256
07-30 12:17:15.498      318-378/? I/qtaguid? Failed write_ctrl(s 0 10048) res=-1 errno=1
07-30 12:17:15.498      318-378/? W/NetworkManagementSocketTagger? setKernelCountSet(10048, 0) failed with errno -1
07-30 12:17:16.346      318-345/? E/Genymotion? Could not open '/sys/class/power_supply/genymotion_fake_path/present'
07-30 12:17:16.934    1077-1077/? I/Process? Sending signal. PID: 1077 SIG: 9
07-30 12:17:16.946      318-329/? I/WindowState? WIN DEATH: Window{536108fc com.bb.test.planapp/com.bb.test.planapp.planapp paused=false}
07-30 12:17:16.946      318-524/? I/ActivityManager? Process com.bb.test.planapp (pid 1077) has died.
07-30 12:17:17.010      318-540/? W/InputMethodManagerService? Got RemoteException sending setActive(false) notification to pid 1077 uid 10048
07-30 12:17:21.350      318-345/? E/Genymotion? Could not open '/sys/class/power_supply/genymotion_fake_path/present'
 
Ähnliche Themen - Text in editText abspeichern und auslesen Antworten Datum
18
16
8