Time of Update: 2018-12-05
1.錯誤:目的編譯stk.apk進system.img..解決: 在PRODUCT_PACKAGES := stk後,編譯後發現 system.img 沒有stk.apk。後細心比較後發現編譯系統是區分大小寫,改stk--->Stk後編譯進去了。 ----2011.12.14 2.錯誤:目的編譯gralloc.msm7k.so。解決:但加裝位置不對,以致沒有編譯進system.img..PRODUCT_PACKAGES := gralloc.msm7k原本放在BoardConfig.mk,
Time of Update: 2018-12-05
$ repo syncException in thread Thread-2:Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner self.run() File "/usr/lib/python2.7/threading.py", line 505, in run self.__target(*self.__args,
Time of Update: 2018-12-05
Android系統架構由5部分組成,分別是:Linux Kernel、Android Runtime、Libraries、Application Framework、Applications。第二部分將詳細介紹這5個部分。下面自底向上分析各層。 Android架構 1、Linux Kernel Android基於Linux 2.6提供核心系統服務,例如:安全、記憶體管理、進程管理、網路堆棧、驅動模型。Linux
Time of Update: 2018-12-05
最近在學Android,想做個google-map-api的小應用,哪知道費死勁了……首先是關於<uses-library />的引用位置,書中沒有提及,結果程式一運行就出現has stopped unexpectedly錯誤,我一開始以為api給的key有問題,於是重新申請了一下,可是問題仍在,於是網上一頓狂搜,發現應該是這樣滴: <application android:icon="@drawable/icon" android:label="@string/app_
Time of Update: 2018-12-05
首先是添加應用 (如果該應用已存在,則要先刪除):編譯好你的Andorid應用程式,然後你需要用adb工具將.apk檔案載入到模擬器的/data/app/目錄下,用法如下面介紹。啟動模擬器(命令列下運行sdk目錄下的/tools/emulator.exe);需要指定你要啟動的本地模擬器.模擬器切換到主畫面(最好不要在程式啟動並執行時候向模擬器安裝程式,可以按home鍵離開應用程式);運行adb,安裝myproject/bin./<appname>.apk檔案。如,安裝Hello
Time of Update: 2018-12-05
主要是記載一下下載源碼過程中的一些問題和解決方案:1. 首先,按照http://source.android.com/source/initializing.html官方網站上得要求,配置了一個Ubuntu的原始碼下載環境。從Ubuntu官網上:http://releases.ubuntu.com/lucid/下載了一個ubuntu-desktop-386的鏡像,之後用虛擬機器建了一個ubuntu的系統。之後按照官網上得要求執行以下命令:下載java SDK 6和安裝一些需要的庫$ sudo
Time of Update: 2018-12-05
問題:im trying to implement MapView example which is defined on Android Hello Views example but now im facing Failed to find provider info for com.google.settings error...解決方案:The MapView example doesn't set API key by default. So you must set it.
Time of Update: 2018-12-05
Chapter 1 ReadingWeb Apps versus Native AppsFirst Web Apps The defining characteristics of a web app are that the user interface (UI) is built with web standard technologies, it is available at a URL (public, private, or perhaps behind a log in),
Time of Update: 2018-12-05
任務、進程和線程 關於Android中的組件和應用,之前涉及,大都是靜態概念。而當一個應用運行起來,就難免會需要關心進程、線程這樣的概念。在Android中,組件的動態運行,有一個最與眾不同的概念,就是Task,翻譯成任務,應該還是比較順理成章的。Task的介入,最主要的作用,是將組件之間的串連,從進程概念的細節中剝離出來,可以以一種不同模型的東西進行配置,在很多時候,能夠簡化上層開發人員的理解難度,協助大家更好的進行開發和配置。任務 在SDK中關於Task(guide/topics
Time of Update: 2018-12-05
如果在你的C:/android-sdk-windows/tools目錄下並沒有adb.exe這個可執行檔。並且當你開啟Eclipse時,有關Android的外掛程式會報錯。這時你就應該這樣做:首先,改一下你的環境變數,把原來的C:/android-sdk-windows/tools改成C:/android-sdk-windows/platform-tools。(如果環境變數找不到,就不用設定)其次,把C:/android-sdk-windows/platform-tools目錄下的adb.exe
Time of Update: 2018-12-05
本文簡要介紹如何通過Ant指令碼Android project編譯打包成APK檔案並安裝到手機。主要步驟:1產生R.java類檔案:利用ant和命令列使用android SDK提供的aapt.ext程式產生R.java。2將.aidl檔案產生.java類檔案:利用ant和命令列使用android SDK提供的aidl.exe產生.java檔案。3第三步 編譯.java類檔案產生class檔案:利用ant和命令列使用jdk的javac編譯java類檔案產生class檔案。4第四步
Time of Update: 2018-12-05
點擊這裡下載原始碼Android中,使用手指觸摸,不能像電腦一樣有滑鼠左鍵和右鍵,所以會有一個PopupWindow來代替滑鼠右鍵。當使用者點擊的時候出現一個彈出的視窗與使用者交流資訊。好了,現在就開始介紹PopupWindow的用法。首先聲明一個PopupWindow的對象PopupWindow pop=null;初始化poppop=new
Time of Update: 2018-12-05
Notification n=new Notification(R.drawable.ic_launcher,"hello world",System.currentTimeMillis());這是建立一個Notification 的對象,的一個參數是表徵圖,顯示在頂部,第二個參數是提示的類容,第三個參數是什麼時候提示。PendingIntent pi=PendingIntent.getActivity(this, 0, new Intent(this,TestActivity.class),
Time of Update: 2018-12-05
我就直接上代碼了try{String systemId="<?xml version=\"1.0\" encoding=\"utf-8\"?><student><name>張譯成</name><age>22</age><address>湖北省</address></student>";SAXParserFactory
Time of Update: 2018-12-05
Android Spinner 有兩種用法1.使用XML布局<Spinner android:id="@+id/mySpinner" android:layout_width="fill_parent" android:layout_height="wrap_content" /><string-array name="planets"> <item>張三</item> &
Time of Update: 2018-12-05
Process localProcess = Runtime.getRuntime().exec("su");這條代碼獲得root許可權OutputStream localOutputStream = localProcess.getOutputStream();DataOutputStream localDataOutputStream = new
Time of Update: 2018-12-05
在原Activity中,使用this.startActivityForResult(intent, 1);第一個參數是Intent對象,包含要到達的Activity資訊,第二個參數是requestCode,當到達的Activity返回時可以得到這個值。在原Activity中覆蓋protected void onActivityResult(int requestCode, int resultCode, Intent data) {// TODO Auto-generated method
Time of Update: 2018-12-05
使用MediaPlayer播放音頻或者視頻的最簡單例子:JAVA代碼部分:public class MediaPlayerStudy extends Activity {private Button bplay,bpause,bstop;private MediaPlayer mp = new MediaPlayer();@Overridepublic void onCreate(Bundle savedInstanceState)
Time of Update: 2018-12-05
*res/raw和assets的相同點:1.兩者目錄下的檔案在打包後會原封不動的儲存在apk包中,不會被編譯成二進位。*res/raw和assets的不同點:1.res/raw中的檔案會被映射到R.java檔案中,訪問的時候直接使用資源ID即R.id.filename;assets檔案夾下的檔案不會被映射到R.java中,訪問的時候需要AssetManager類。2.res/raw不可以有目錄結構,而assets則可以有目錄結構,也就是assets目錄下可以再建立檔案夾*讀取檔案資源:1.讀取r
Time of Update: 2018-12-05
從網上找了一圈 大致有兩種方法方法一:Java代碼 <TabHost xmlns:android="http://schemas.android.com/apk/res/android"android:id="@android:id/tabhost" android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout