使用Eclipse開發Android相關設定問題!
2018年Android開發平台已經由Google自家的Android Studio為主,其他IDE如Eclipse跟NetBeans很難找到資源,這裡記錄這兩週在建置Eclipse FOR Android時遇到的點點滴滴。
首先是Android SDK開發套件,官方已不容易找到載點。
不容易找到載點
複習如何建立Eclipse for Android開發環境:
https://www.jianshu.com/p/c0c2f8a46cb0
SDK遇到閃退,解決連結:
http://yu0410aries.blogspot.tw/2013/06/sdk-manager.html
https://hk.saowen.com/a/26bf2c7dc7a0c320ea138042c8590ad40d6a4ffd12f115c039eb1afc55e61d5e
https://blog.csdn.net/fl1623863129/article/details/72199816
https://blog.csdn.net/xzlAwin/article/details/45959183
http://blog.xuite.net/free6d1823/blog/76401242-Eclipse+%E8%A3%9D%E5%AE%8C+ADT,+Window+%E5%BA%95%E4%B8%8B%E7%9C%8B%E4%B8%8D%E5%88%B0+Android+SDK+Manager
複習如何安裝SDK:
https://www.androidcentral.com/installing-android-sdk-windows-mac-and-linux-tutorial
http://www.tshopping.com.tw/thread-250607-1-1.html
http://learnexp.tw/%E3%80%90android%E3%80%91%E6%A8%A1%E6%93%AC%E5%99%A8eclipse%E5%AE%89%E8%A3%9D%E6%95%99%E5%AD%B8%E6%96%B0-%E5%BE%9E0%E5%88%B01/
http://www.laird.tw/2016/11/eclipse-android-with-os-x.html
SDK在Win10內的變數設定Path:
https://jingyan.baidu.com/article/15622f2434bc5cfdfcbea51c.html
Android SDK manager結構:
https://blog.csdn.net/u011026779/article/details/53178602
eclipse中graphical layout不顯示手機預覽窗口的問題解決方法(嘗試失敗未解決):
https://read01.com/zh-tw/PMdMzg.html#.WrrwPYhuaUl
https://ifun01.com/V9GPFOY.html
https://blog.csdn.net/myapplication/article/details/47128487
原文網址:https://read01.com/PMdMzg.html
關鍵解決方法:
發現了以元素’d:skin’ 開頭的無效內容。此處不應含有子元素。
http://mydebug.blogspot.tw/2016/01/httpwww.html
https://cnbin.github.io/blog/2016/06/12/da-kai-eclipsebao-cuo-:fa-xian-liao-yi-yuan-su-d-skin-kai-tou-de-wu-xiao-nei-rong-.-ci-chu-bu-ying-han-you-zi-yuan-su/
方法1: 在SDK Manager里删除Android-wear相关的image
方法2: 进入sdk目录下,把
..\android-sdk\system-images\android-22\android-wear\armeabi-v7a\devices.xml和..\android-sdk\system-images\android-22\android-wear\x86\devices.xml文件删除,再把sdk里面..\android-sdk\tools\lib\下的devices.xml拷贝到上述两个文件夹里,重启eclipse即可
adb server is out of date 啟動失敗:
https://blog.csdn.net/liranke/article/details/42524851
解决Android library project cannot be launched
https://blog.csdn.net/welovesunflower/article/details/7990952
解決Unable to build: the file dx.jar was not loaded from the SDK folder
https://blog.csdn.net/qq_32224139/article/details/69525946
https://stackoverflow.com/questions/43009679/unknown-error-unable-to-build-the-file-dx-jar-was-not-loaded-from-the-sdk-fold/43040723
對岸的問題小彙整:
https://blog.csdn.net/androiddevelop/article/details/8130416
https://www.jianshu.com/p/1cc1d2df7f95
Android ADT整合包下載(老舊版本啟動失敗):
http://forum.jeasy.info/viewtopic.php?f=61&t=1521
Eclipse自帶jre檔方法:
http://joerong666.iteye.com/blog/309911
關鍵:
在eclipse.c中,有查找shipped VM的代码,eclipse.exe会先查找有没有自带的JVM,有的话就用它启动:
/* Find the Directory where the Eclipse program is installed. */
programDir = getProgramDir();
…
/* If the user did not specify a VM to be used */
if (vmName == NULL)
{
/* Determine which type of VM should be used. */
vmName = ((debug needConsole) ? consoleVM : defaultVM);
/* Try to find the VM shipped with eclipse. */
shippedVM = malloc( (_tcslen( programDir ) + _tcslen( shippedVMDir ) + _tcslen( vmName ) + 10) * sizeof(_TCHAR) );
_stprintf( shippedVM, _T_ECLIPSE(“%s%s%s”), programDir, shippedVMDir, vmName );
JavaVM = findCommand( shippedVM );
/* Format a message to indicate the default VM search path. */
vmSearchPath = malloc( (_tcslen( pathMsg ) + _tcslen( shippedVM ) + _tcslen( vmName ) + 10) * sizeof(_TCHAR) );
_stprintf( vmSearchPath, pathMsg, shippedVM, vmName );
free( shippedVM );
shippedVM = NULL;
}
eclipseWin.h
_TCHAR* consoleVM = _T(“java.exe”);
_TCHAR* defaultVM = _T(“javaw.exe”);
_TCHAR* shippedVMDir = _T(“jre\\bin\\”);
这样就可以通过自带JRE解决客户端库不完全的问题
舊版Java官方載點,需申請Oracle帳密:
http://www.oracle.com/technetwork/java/javase/archive-139210.html
Eclipse 自帶jre啟動運行測試
Eclipse 2016,2017,2018+自留存java 8皆成功啟動並可輸出apk於手機運行
自留存java7,9,10皆無法正常運作(找不到jre檔案)
交叉比對,java 7 x64版jre搭配2018版Eclipse啟動成功!
交叉比對,java 9 x64版jre搭配2018版Eclipse啟動成功!
交叉比對,java 10 x64版jre搭配2018版Eclipse啟動….無法重新安裝(系統玩壞了)….暫時擱置測試,待新版java或有空再測試。
Eclipse 2018+安裝java 10皆成功啟動並可輸出apk於手機運行
目前決定開發環境-沿用2018年版Eclipse+Java8+Android+Gluon(測試中)
Eclipse 2018+系統安裝java啟動運行測試
皆可正常運作,不分java版本
版權聲明:網路搜尋連結,供建立環境快速查找使用,因無個論壇帳號,故留存連結,如原作者有疑義,請mail給我將連結移除mail:gerry.aaa@yahoo.com.tw