Posts

Showing posts from 2016

Changing the Cordova app icon(最簡單的方法)

Image
Changing the Cordova app icon i have been trying to change the icon for hours. this is the only way works on me. i has spent me 8 hours tried many ways to figure out how to change the icon. before "cordova build android" after "cordova platform add android" just need 2 step : 1. add myico.png   in D:\note\platforms\android\res\ drawable   2. D:\note\platforms\android\AndroidManifest.xml <application android:hardwareAccelerated=”true” android:icon=”@ drawable/myIcon ” android:label=”@string/app_name”>

APP封裝與實測 -SDK+JAVA+ANT+Cordova+opera mobile emultor

Image
1.安裝以下: SDK jdk ANT https://sofree.cc/iphone-android-simulator/ nodejs 2.環境變數 新增以下3個名稱及路徑: JAVA_HOME C:\Program Files\Java\jdk1.8.0_111 ANT_HOME C:\Program Files (x86)\Android\apache-ant-1.9.7 ANDROID_SDK C:\Program Files (x86)\Android\android-sdk path新增以下4個: %JAVA_HOME%\bin\ %ANT_HOME%\bin\ %ANDROID_SDK%\tools\ %ANDROID_SDK%\platform-tools\ 3.cmd 以系統管理管開啟(右鍵 run as admin..) npm install -g cordova 4.AVD設定 5.cordova指令語法 新增專案 語法: cordova create fileName appId projectName cordova create hello com.example.hello hello 加入android平台:(cd到剛才新增的資料夾) cordova platform add android 置入網頁於/www (首頁需為index.html)後, 改config.xml <content src="index.html> 建立APP: 方法一(建立&模擬預覽) cordova run android  方法二(邁立) cordova build