顯示具有 android開發 標籤的文章。 顯示所有文章
顯示具有 android開發 標籤的文章。 顯示所有文章

使用Maven時出現 Unable to find the mojo 'generate-sources' (or one of its required components) in the plugin 'com.jayway.maven.plugins.android.generation2:android-maven-plugin' 問題

最近在使用Maven來build Spring Android的Sample Project時,在mvn clean install的階段時,會出現Unable to find the mojo 'generate-sources' (or one of its required components) in the plugin 'com.jayway.maven.plugins.android.generation2:android-maven-plugin'這樣的問題。

第一個問題是,Spring Android的Sample Project需要使用Maven3.0.3以上,請參考issue220

接著,當你在使用maven 3去install時,如果出現java.lang.NoClassDefFoundError: org/codehaus/plexus/classworlds/launcher/Launcher的錯誤,請先檢查原本的作業系統中,是否有安裝maven2,如果有,要去環境變數中,把相關的path給拿掉,如果有設定M2_HOME,也要一併移除。

Android的Activity學習筆記

在開發Android的Mobile Application當中,Activity是相當重要的一個觀念。這一篇紀錄著我學習Activity相關的筆記,也歡迎大家留言討論。

[Android Dev] 判斷SD卡是否存在

To check whether the sdcard existed or not, execute the following code :

if(android.os.Environment.getExternalStorageState().equals(android.os.Environment.MEDIA_MOUNTED))