android±ÊÊÔÌâ¼°Æä²Î¿¼´ð°¸

·¢²¼Ê±¼ä£º2021-12-28 02:39:42

ÉíΪһ¸ö°²×¿¹¤³Ìʦ£¬ÃæÊԵĹý³ÌÖÐ×ÔÈ»Ãâ²»ÁË»áÒªÓöµ½±ÊÊÔµÄÌâÄ¿£¬ÄÇô¸ÃÔõô˳Àûͨ¹ý±ÊÊÔÄØ£¿ÏÂÃæС±à¾Í¸ø´ó¼Ò·ÖÏíһЩandroid±ÊÊÔÌâ¼°Æä²Î¿¼´ð°¸£¬Ï£ÍûÄÜ°ïÖúÄã¸üºÃµÄͨ¹ýÃæÊÔ£¬¿ìÀ´¿´¿´°É£¡

android±ÊÊÔÌâ¼°Æä²Î¿¼´ð°¸

ÔÚandroidÖУ¬Çë¼òÊöjniµÄµ÷Óùý³Ì¡£

1)°²×°ºÍÏÂÔØCygwin£¬ÏÂÔØ Android NDK

2)ÔÚndkÏîÄ¿ÖÐJNI½Ó¿ÚµÄÉè¼Æ

3)ʹÓÃC/C ʵÏÖ±¾µØ·½·¨

4)JNIÉú³É¶¯Ì¬Á´½Ó¿â.soÎļþ

5)½«¶¯Ì¬Á´½Ó¿â¸´ÖƵ½java¹¤³Ì£¬ÔÚjava¹¤³ÌÖе÷Óã¬ÔËÐÐjava¹¤³Ì¼´¿É

¼òÊöAndroidÓ¦ÓóÌÐò½á¹¹ÊÇÄÄЩ?

AndroidÓ¦ÓóÌÐò½á¹¹ÊÇ£º

Linux Kernel(LinuxÄÚºË)¡¢Libraries(ϵͳÔËÐпâ»òÕßÊÇc/c ºËÐÄ¿â)¡¢Application

Framework(¿ª·¢¿ò¼Ü°ü)¡¢Applications (ºËÐÄÓ¦ÓóÌÐò)

Èç¹ûºǫ́µÄActivityÓÉÓÚijԭÒò±»ÏµÍ³»ØÊÕÁË£¬ÈçºÎÔÚ±»ÏµÍ³»ØÊÕ֮ǰ±£´æµ±Ç°×´Ì¬?

onSaveInstanceState()

µ±ÄãµÄ³ÌÐòÖÐijһ¸öActivity AÔÚÔËÐÐʱ£¬Ö÷¶¯»ò±»¶¯µØÔËÐÐÁíÒ»¸öеÄActivity B£¬Õâ¸öʱºòA»áÖ´ÐÐonSaveInstanceState()¡£BÍê³ÉÒÔºóÓÖ»áÀ´ÕÒA£¬Õâ¸öʱºò¾ÍÓÐÁ½ÖÖÇé¿ö£ºÒ»ÊÇA±»»ØÊÕ£¬¶þÊÇAûÓб»»ØÊÕ£¬±»»ØÊÕµÄA¾ÍÒªÖØе÷ÓÃonCreate()·½·¨£¬²»Í¬ÓÚÖ±½ÓÆô¶¯µÄÊÇÕâ»ØonCreate()ÀïÊÇ´øÉÏÁ˲ÎÊýsavedInstanceState;¶øû±»ÊջصľÍÖ±½ÓÖ´ÐÐonResume()£¬Ìø¹ýonCreate()ÁË¡£

ÈçºÎ½«Ò»¸öActivityÉèÖóɴ°¿ÚµÄÑùʽ¡£

ÔÚAndroidManifest.xml Öж¨ÒåActivityµÄµØ·½Ò»¾ä»°android:theme="@android:style/Theme.Dialog"»òandroid:theme="@android:style/Theme.Translucent"¾Í±ä³É°ë͸Ã÷µÄ

Çë½éÉÜÏÂAndroidÖг£ÓõÄÎåÖÖ²¼¾Ö¡£

FrameLayout(¿ò¼Ü²¼¾Ö)£¬LinearLayout (ÏßÐÔ²¼¾Ö)£¬AbsoluteLayout(¾ø¶Ô²¼¾Ö)£¬RelativeLayout(Ïà¶Ô²¼¾Ö)£¬TableLayout(±í¸ñ²¼¾Ö)

Çë½éÉÜÏÂAndroidµÄÊý¾Ý´æ´¢·½Ê½¡£

Ò».SharedPreferences·½Ê½

¶þ.Îļþ´æ´¢·½Ê½

Èý.SQLiteÊý¾Ý¿â·½Ê½

ËÄ.ÄÚÈÝÌṩÆ÷(Content provider)·½Ê½

Îå. ÍøÂç´æ´¢·½Ê½

Çë½éÉÜÏÂContentProviderÊÇÈçºÎʵÏÖÊý¾Ý¹²ÏíµÄ¡£

´´½¨Ò»¸öÊôÓÚÄã×Ô¼ºµÄContent provider»òÕß½«ÄãµÄÊý¾ÝÌí¼Óµ½Ò»¸öÒѾ­´æÔÚµÄContent providerÖУ¬Ç°ÌáÊÇÓÐÏàͬÊý¾ÝÀàÐͲ¢ÇÒÓÐдÈëContent providerµÄȨÏÞ¡£

Çë½âÊÍÏÂAndroid³ÌÐòÔËÐÐʱȨÏÞÓëÎļþϵͳȨÏÞµÄÇø±ð¡£

ÔËÐÐʱȨÏÞDalvik( androidÊÚȨ)

Îļþϵͳ linux ÄÚºËÊÚȨ

ϵͳÉÏ°²×°Á˶àÖÖä¯ÀÀÆ÷£¬ÄÜ·ñÖ¸¶¨Ä³ä¯ÀÀÆ÷·ÃÎÊÖ¸¶¨Ò³ÃæÃæ?Çë˵Ã÷Ô­ÓÉ¡£

ͨ¹ýÖ±½Ó·¢ËÍUri°Ñ²ÎÊý´ø¹ýÈ¥£¬»òÕßͨ¹ýmanifestÀïµÄintentfilterÀïµÄdataÊôÐÔ

ʲôÇé¿ö»áµ¼ÖÂForce Close ?ÈçºÎ±ÜÃâ?ÄÜ·ñ²¶»ñµ¼ÖÂÆäµÄÒì³£?

´ð£ºÒ»°ãÏñ¿ÕÖ¸Õë°¡£¬¿ÉÒÔ¿´Æðlogcat£¬È»ºó¶ÔÓ¦µ½³ÌÐòÖÐ À´½â¾ö´íÎó

IntentServiceÓкÎÓŵã?

´ð£ºIntentService µÄºÃ´¦

* AcitivityµÄ½ø³Ì£¬µ±´¦ÀíIntentµÄʱºò£¬»á²úÉúÒ»¸ö¶ÔÓ¦µÄService

* AndroidµÄ½ø³Ì´¦ÀíÆ÷ÏÖÔڻᾡ¿ÉÄܵIJ»killµôÄã

* ·Ç³£ÈÝÒ×ʹÓÃ

ºáÊúÆÁÇл»Ê±ºòactivityµÄÉúÃüÖÜÆÚ?

1¡¢²»ÉèÖÃActivityµÄandroid:configChangesʱ£¬ÇÐÆÁ»áÖØе÷Óø÷¸öÉúÃüÖÜÆÚ£¬ÇкáÆÁʱ»áÖ´ÐÐÒ»´Î£¬ÇÐÊúÆÁʱ»áÖ´ÐÐÁ½´Î

2¡¢ÉèÖÃActivityµÄandroid:configChanges="orientation"ʱ£¬ÇÐÆÁ»¹ÊÇ»áÖØе÷Óø÷¸öÉúÃüÖÜÆÚ£¬ÇкᡢÊúÆÁʱֻ»áÖ´ÐÐÒ»´Î

3¡¢ÉèÖÃActivityµÄandroid:configChanges="orientation|keyboardHidden"ʱ£¬ÇÐÆÁ²»»áÖØе÷Óø÷¸öÉúÃüÖÜÆÚ£¬Ö»»áÖ´ÐÐonConfigurationChanged·½·¨

ÈçºÎ½«SQLiteÊý¾Ý¿â(dictionary.dbÎļþ)ÓëapkÎļþÒ»Æð·¢²¼?

½â´ð£º¿ÉÒÔ½«dictionary.dbÎļþ¸´ÖƵ½Eclipse Android¹¤³ÌÖеÄres awĿ¼ÖС£ËùÓÐÔÚres awĿ¼ÖеÄÎļþ²»»á±»Ñ¹Ëõ£¬ÕâÑù¿ÉÒÔÖ±½ÓÌáÈ¡¸ÃĿ¼ÖеÄÎļþ¡£¿ÉÒÔ½«dictionary.dbÎļþ¸´ÖƵ½res awĿ¼ÖÐ

ÔĶÁ¸ü¶àÊÔÌ⣬Çë·ÃÎÊÉú»îÈÕ¼ÇÍø ÓÃÈÕÖ¾¼Ç¼µãµÎÉú»î£¡ÖÐСѧÉúÈÕ¼ÇƵµÀ¡£
ϲ»¶ÖÐСѧÉúÈռǣ¬ÄǾ;­³£À´Å¶

¸ÃÄÚÈÝÓÉÉú»îÈÕ¼ÇÍøÌṩ.