2011-05-17 45 views
1

私は疑問を持っています...私の一部の不注意かどうかは分かりません。 mBitmap.compress(Bitmap.CompressFormat.PNG,100, out);を使用してビットマップをpngに保存していました。 コードでは、このコードの下の行はこれに応答しません。 私はそれを明確にしましょう 私はLog.i(xy,xy);の方法ですべての交互行に問題をトレースしましたが、mBitmap.compress(Bitmap.CompressFormat.PNG,100, out);の前の行までのすべてのログと私はtry-catchにコード全体を含めましたが、例外はありませんでした捕らえられた私は、パラメータとオブジェクトがnullであるかどうかを確認しましたが、そうではありません。私はタイムアウトが終了し、ウェイクロックを放棄しました!

はLogcat

05-17 10:07:24.819: WARN/ActivityManager(73): Launch timeout has expired, giving up wake lock! 
05-17 10:07:24.849: WARN/ActivityManager(73): Activity idle timeout for ActivityRecord{40968180 com.test.android.sk/.FPaint} 

編集

public String cReatePNG(){ 

     Log.i("cp1", "in the create png"); 

      try{ 
       Log.i("cp2", "in the create png"); 
       flag=true; 
       DataBaseHelper myDbHelper = new DataBaseHelper(this); 

       String pattern= "dd-MM-yyyy-HHmmss" ; 
       SimpleDateFormat format = new SimpleDateFormat(pattern); 
       String formattedDate = format.format(new Date()); 
      Log.i("cp3", "in the create png"); 
       tmpfile= CreateTempDir.createTempDir(); 

       File file = new File(Environment.getExternalStorageDirectory() 
       + File.separator+"/SK_Temp/img-"+formattedDate+".png"); 

      try{ 

       Log.i("cp4", "in the create png"+file);  
        FileOutputStream out = new FileOutputStream(file); 
       Log.i("cp5", "in the create png");  
       Log.i("view",out.toString()); 
       view.mBitmap.compress(Bitmap.CompressFormat.PNG,100,out); // <----issue with this line 
      }catch(Exception e){ e.printStackTrace();} 
       Log.i("CP#file_creation", "PNG file created"); 
       filename=file.toString(); 
      }catch(Exception e){e.printStackTrace();} 
+0

あなたはデバッグを試みましたか? – Kakey

+0

あなたの問題は何ですか?イメージが正しく圧縮/保存されていないか、トレースログが表示されません。コードの重要な部分は、より明確な説明が役立ちます。 – Zelimir

+0

私はlogcat.Iの私のデバッガにいくつかの問題がある、私は正しく動作していないの応答を取得しないでください。 – rahul

答えて

0

アプリはVMのbugetを超えている可能性が...事前に

おかげで混乱しhere..pleaseヘルプ午前メモリが不足しました。

+0

エミュレータが強制的にアプリを閉じるかもしれません...またはアプリ上のそれ以上のクリックに反応しません...しかし私のためにそれは応答します – rahul

関連する問題