android error

When you debug or run (android 4.0.0 or upper) by AVD(emulator), the error (device not found) may show, this is not error, the appjust not start auto, you can start in the running AVD. 

 ---------------------------------------------------

Add event to calendar

 

API level >= 14 (ice creamsandwich)

Events.DTEND is different meaning,it means the series of all events end time, not a single event last time (e.g.9-5);

for non-recurring events, you mustcontains the Events.DTEND

for recurring events, you mustcontains Events.DURATION

DTEND and DURATION can not exist atsame time.

 

API level < 14

Events.DTEND means single event lasttime (e.g. 9-5);

------------------------------------------------------

 

Some class only exist in high API level in android, it willnot compile when you program (compile by eclipse) build target to lower levelAPI. 

Fixed:  put your code(higher level class in a single function)

Example:    StrictMode.ThreadPolicyonly exist at 9 api level, but this app target from apilevel from 8 – 15.

@TargetApi(9)
	public static void requestPermitForICS()
	{
		StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
		StrictMode.setThreadPolicy(policy);		
	}


發佈了79 篇原創文章 · 獲贊 1 · 訪問量 5萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章