超时已过期,放弃唤醒锁! [英] timeout has expired, giving up wake lock!
问题描述
我有一个疑问......我不知道是否它从我的一部分了一些粗心大意。
我使用 mBitmap.com preSS(Bitmap.Com pressFormat.PNG,100,出);
保存位图PNG。
在code此code下的线不随对此作出回应。
让我说清楚,
我已经给 Log.i(XY,XY);
在该方法中的所有行交替跟踪的问题,但所有的日志,直到前行 mBitmap.com preSS(Bitmap.Com pressFormat.PNG,100,出);
版画,我已经包含在的try-catch
,但没有异常被抓住了。我检查了参数和对象是否为空,但没有事实并非如此。我很困惑here..please帮助...
在此先感谢
的logcat
10月5日至十七日:07:24.819:WARN / ActivityManager(73):启动超时已过期,放弃唤醒锁!
10月5日至十七日:07:24.849:WARN / ActivityManager(73):为ActivityRecord {40968180 com.test.android.sk/.FPaint}活动空闲超时
修改
公共字符串cReatePNG(){ Log.i(CP1,在创建PNG); 尝试{
Log.i(CP2,在创建PNG);
标志=真实的;
DataBaseHelper myDbHelper =新DataBaseHelper(本); 字符串模式=DD-MM-YYYY-HHMMSS
SimpleDateFormat的格式=新的SimpleDateFormat(模式);
字符串formattedDate = format.format(新的Date());
Log.i(CP3,在创建PNG);
TMPFILE = CreateTempDir.createTempDir(); 档案文件=新的文件(Environment.getExternalStorageDirectory()
+文件分割符+/ SK_Temp / IMG - + formattedDate +PNG); 尝试{ Log.i(在创建PNG+文件CP4,);
FileOutputStream中出=新的FileOutputStream(文件);
Log.i(CP5,在创建PNG);
Log.i(意见,out.toString());
view.mBitmap.com preSS(Bitmap.Com pressFormat.PNG,100,出); //< ----这一行问题
}赶上(例外五){e.printStackTrace();}
Log.i(CP#file_creation,创建PNG文件);
文件名= file.toString();
}赶上(例外五){e.printStackTrace();}
该应用程序可能已经超出了VM预算所占跑出去的内存。
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();}
The app could have exceeded the VM buget and ran out of memory..
这篇关于超时已过期,放弃唤醒锁!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!