超时已到,放弃唤醒锁!
我有一个疑问……我不确定是否是我的粗心。 我使用 mBitmap.compress(Bitmap.compressFormat.PNG,100, out);
将位图保存为 png 。 在代码中,该代码下方的行不会随之响应。 让我说清楚, 我已经在方法中的所有交替行中给出了 Log.i(xy,xy);
来跟踪问题,但所有 Log 直到 mBitmap.compress(Bitmap.compressFormat 之前的行.PNG,100, out); 打印,我已将整个代码包含在 try-catch
中,但没有捕获任何异常。我检查了参数和对象是否为空,但它们不是。我在这里很困惑..请帮忙...
提前致谢
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();}
I have a doubt...i am not sure whether its some carelessness from my part.
I was using mBitmap.compress(Bitmap.CompressFormat.PNG,100, out);
to save a bitmap to png .
In the code the line beneath this code does not respond along with this.
Let me make it clear,
I have given Log.i(xy,xy);
in all the alternating lines in the method to trace the issue, but all the Log until the line before mBitmap.compress(Bitmap.CompressFormat.PNG,100, out);
prints and I have included the whole code in a try-catch
, but no exception was caught. I have checked whether the parameter and the object were null, but no they are not. I am confused here..please help ...
Thanks in advance
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}
Edit
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();}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该应用程序可能超出了VM buget并耗尽了内存。
The app could have exceeded the VM buget and ran out of memory..