我目前必須爲Android上的Jaspersoft Report Server構建移動客戶端。爲了做到這一點,我得到了現有的開源JasperMobile應用程序的源代碼,認爲我可以使用它作爲基礎/模板,並將其擴展爲我們公司所需的特定功能。整理出一噸的構建問題後,我堅持最後一個一個:用Eclipse構建JasperMobile/Android的Maven
在構建我從行家以下的輸出:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building js-android-jaspermobile 1.5
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ js-android-jaspermobile ---
[INFO] Deleting C:\Development\JasperMobile\target
[INFO]
[INFO] --- android-maven-plugin:3.3.0:generate-sources
(default-generate-sources) @ js-android-jaspermobile ---
[DEBUG] Expanding: c:\DEVELOPMENT\maven\repo\com\actionbarsherlock\actionbarsherlock\4.3.1
\actionbarsherlock-4.3.1.apklib into C:\Development\JasperMobile\target\unpack\apklibs
\com.actionbarsherlock_actionbarsherlock_apklib_4.3.1
[DEBUG] expand complete
[INFO] ANDROID-904-002: Found aidl files: Count = 0
[INFO] ANDROID-904-002: Found aidl files: Count = 0
[INFO] ANDROID-904-002: Found aidl files: Count = 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.767s
[INFO] Finished at: Tue Jul 09 14:49:37 CAT 2013
[INFO] Final Memory: 6M/11M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-
plugin:3.3.0:generate-sources (default-generate-sources) on project js-android-
jaspermobile: Execution default-generate-sources of goal
com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.3.0:generate-sources
failed: Could not find tool 'aapt'. Please provide a proper Android SDK directory path as
configuration parameter <sdk><path>...</path></sdk> in the plugin <configuration/>. As an
alternative, you may add the parameter to commandline: -Dandroid.sdk.path=... or set
environment variable ANDROID_HOME. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the
following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
我已經閱讀了這個問題,它似乎是相關的到用於集成maven和android開發的eclipse插件。它在\ platform-tools \中而不是\ build-tools \中查找aapt.exe和aidl.exe。目前的解決方法似乎是爲必要的文件製作符號鏈接(在win7中使用mklink作爲管理員),但是當鏈接一個可執行文件時,我會得到一個破損的文件而不是鏈接,儘管根據cmd該操作是成功的。
請問我是一個mavin和windoze n00b所以如果有可能是另一種解決方法?也許點maven到正確的位置?其他一些符號鏈接工具?
謝謝大家!
如果這在命令行上失敗,如上面的輸出日誌所示,那麼這可能不是用於將maven與android開發集成的eclipse插件的問題。 –