0
Ich habe ein Problem beim Speichern der Leinwand Bild gezeichnet. Hier ist der Code:android leinwand zeichnung
public void save_it(File file)
{
String fname = file.getAbsolutePath();
MyView mv =new MyView(this);
FileOutputStream fos = null;
try{
fos = new FileOutputStream(fname);
mv.myBitmap.compress(CompressFormat.JPEG, 100, fos);
Toast.makeText(this,"Image Saved", 2000).show();
}
catch(Exception e){
Toast.makeText(this,"Error Saving Image", 2000).show();
Log.i("DAVE","stacktrace is " + e);
}
Was ist das Problem? Wo ist die Stack-Spur? Was ist MyView? Wird das Feld "myBitmap" beim Erstellen initialisiert? (PS .: Bitte verwenden Sie die Logarithmus-Methode mit drei Argumenten: 'Log.i (" DAVE "," stacktrace follows ", e);' –