Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void escribirFicheroMemoriaInterna()
- {
- OutputStreamWriter escritor=null;
- try
- {
- escritor=new OutputStreamWriter(openFileOutput("pruebaFichero.txt", Context.MODE_PRIVATE));
- escritor.write(tbTexto.getText().toString());
- }
- catch (Exception ex)
- {
- Log.e("ivan", "Error al escribir fichero a memoria interna");
- }
- finally
- {
- try {
- if(escritor!=null)
- escritor.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
- private void leerFicheroMemoriaInterna()
- {
- InputStreamReader flujo=null;
- BufferedReader lector=null;
- try
- {
- flujo= new InputStreamReader(openFileInput("pruebaFichero.txt"));
- lector= new BufferedReader(flujo);
- String texto = lector.readLine();
- while(texto!=null)
- {
- tbTexto.setText(texto);
- texto=lector.readLine();
- }
- }
- catch (Exception ex)
- {
- Log.e("ivan", "Error al leer fichero desde memoria interna");
- }
- finally
- {
- try {
- if(flujo!=null)
- flujo.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
- ...
- public class Calentando extends AppCompatActivity {
- public String rx = "190";
- public TextView Tempview;
- static final int READ_BLOCK_SIZE = 100;
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate( savedInstanceState );
- getWindow().setFlags( WindowManager.LayoutParams.FLAG_FULLSCREEN,
- WindowManager.LayoutParams.FLAG_FULLSCREEN );
- setContentView( R.layout.activity_calentando );
- }
- {
- try {
- FileInputStream in = openFileInput( "value" );
- InputStreamReader inputStreamReader = new InputStreamReader( in );
- BufferedReader bufferedReader = new BufferedReader( inputStreamReader );
- StringBuilder sb = new StringBuilder();
- String line;
- while ((line = bufferedReader.readLine()) != null) {
- sb.append( line );
- }
- inputStreamReader.close();
- Tempview = (TextView) findViewById( R.id.temperatura );
- Tempview.setText( line ) ;
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
- 01-01 08:18:20.191 4940-4940/com.serial.www.qualit W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --compiler-filter=interpret-only --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=generic --instruction-set-features=default --dex-file=/data/app/com.serial.www.qualit-2/split_lib_dependencies_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@com.serial.www.qualit-2@split_lib_dependencies_apk.apk@classes.dex) because non-0 exit status
- 01-01 08:18:20.486 4940-4940/com.serial.www.qualit W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --compiler-filter=interpret-only --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=generic --instruction-set-features=default --dex-file=/data/app/com.serial.www.qualit-2/split_lib_slice_0_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@com.serial.www.qualit-2@split_lib_slice_0_apk.apk@classes.dex) because non-0 exit status
- 01-01 08:18:20.563 4940-4940/com.serial.www.qualit W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --compiler-filter=interpret-only --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=generic --instruction-set-features=default --dex-file=/data/app/com.serial.www.qualit-2/split_lib_slice_1_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@com.serial.www.qualit-2@split_lib_slice_1_apk.apk@classes.dex) because non-0 exit status
- 01-01 08:18:20.632 4940-4940/com.serial.www.qualit W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --compiler-filter=interpret-only --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=generic --instruction-set-features=default --dex-file=/data/app/com.serial.www.qualit-2/split_lib_slice_2_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@com.serial.www.qualit-2@split_lib_slice_2_apk.apk@classes.dex) because non-0 exit status
- 01-01 08:18:20.709 4940-4940/com.serial.www.qualit W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --compiler-filter=interpret-only --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=generic --instruction-set-features=default --dex-file=/data/app/com.serial.www.qualit-2/split_lib_slice_3_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@com.serial.www.qualit-2@split_lib_slice_3_apk.apk@classes.dex) because non-0 exit status
- 01-01 08:18:20.776 4940-4940/com.serial.www.qualit W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --compiler-filter=interpret-only --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=generic --instruction-set-features=default --dex-file=/data/app/com.serial.www.qualit-2/split_lib_slice_4_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@com.serial.www.qualit-2@split_lib_slice_4_apk.apk@classes.dex) because non-0 exit status
- 01-01 08:18:20.841 4940-4940/com.serial.www.qualit W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --compiler-filter=interpret-only --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=generic --instruction-set-features=default --dex-file=/data/app/com.serial.www.qualit-2/split_lib_slice_5_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@com.serial.www.qualit-2@split_lib_slice_5_apk.apk@classes.dex) because non-0 exit status
- 01-01 08:18:20.904 4940-4940/com.serial.www.qualit W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --compiler-filter=interpret-only --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=generic --instruction-set-features=default --dex-file=/data/app/com.serial.www.qualit-2/split_lib_slice_6_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@com.serial.www.qualit-2@split_lib_slice_6_apk.apk@classes.dex) because non-0 exit status
- 01-01 08:18:20.975 4940-4940/com.serial.www.qualit W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --compiler-filter=interpret-only --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=generic --instruction-set-features=default --dex-file=/data/app/com.serial.www.qualit-2/split_lib_slice_7_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@com.serial.www.qualit-2@split_lib_slice_7_apk.apk@classes.dex) because non-0 exit status
- 01-01 08:18:21.043 4940-4940/com.serial.www.qualit W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --compiler-filter=interpret-only --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=generic --instruction-set-features=default --dex-file=/data/app/com.serial.www.qualit-2/split_lib_slice_8_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@com.serial.www.qualit-2@split_lib_slice_8_apk.apk@classes.dex) because non-0 exit status
- 01-01 08:18:21.108 4940-4940/com.serial.www.qualit W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --compiler-filter=interpret-only --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=generic --instruction-set-features=default --dex-file=/data/app/com.serial.www.qualit-2/split_lib_slice_9_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@com.serial.www.qualit-2@split_lib_slice_9_apk.apk@classes.dex) because non-0 exit status
- 01-01 08:18:21.111 4940-4940/com.serial.www.qualit W/System: ClassLoader referenced unknown path: /data/app/com.serial.www.qualit-2/lib/arm64
- 01-01 08:18:21.250 4940-4940/com.serial.www.qualit W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
- 01-01 08:18:21.751 4940-4940/com.serial.www.qualit W/art: Before Android 4.1, method int android.support.v7.widget.DropDownListView.lookForSelectablePosition(int, boolean) would have incorrectly overridden the package-private method in android.widget.ListView
- 01-01 08:18:27.868 4940-4940/com.serial.www.qualit E/AndroidRuntime: FATAL EXCEPTION: main
- Process: com.serial.www.qualit, PID: 4940
- java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.serial.www.qualit/com.serial.www.qualit.Calentando}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.io.FileInputStream android.content.Context.openFileInput(java.lang.String)' on a null object reference
- at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2327)
- at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
- at android.app.ActivityThread.-wrap11(ActivityThread.java)
- at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
- at android.os.Handler.dispatchMessage(Handler.java:102)
- at android.os.Looper.loop(Looper.java:148)
- at android.app.ActivityThread.main(ActivityThread.java:5417)
- at java.lang.reflect.Method.invoke(Native Method)
- at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:742)
- at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:632)
- Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.io.FileInputStream android.content.Context.openFileInput(java.lang.String)' on a null object reference
- at android.content.ContextWrapper.openFileInput(ContextWrapper.java:177)
- at com.serial.www.qualityfry.Calentando.<init>(Calentando.java:92)
- at java.lang.Class.newInstance(Native Method)
- at android.app.Instrumentation.newActivity(Instrumentation.java:1067)
- at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2317)
- at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
- at android.app.ActivityThread.-wrap11(ActivityThread.java)
- at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
- at android.os.Handler.dispatchMessage(Handler.java:102)
- at android.os.Looper.loop(Looper.java:148)
- at android.app.ActivityThread.main(ActivityThread.java:5417)
- at java.lang.reflect.Method.invoke(Native Method)
- at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:742)
- at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:632)
Add Comment
Please, Sign In to add comment