我目前必须为 Android 上的 Jaspersoft Report Server 构建一个移动客户端。为了做到这一点,我获得了现有开源 JasperMobile 应用程序的源代码,我认为我可以将其用作基础/模板,并使用我们公司需要的特定功能对其进行扩展。在整理出大量构建问题后,我陷入了最后一个问题:
构建时,我从 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 操作是成功的。
请问我是一个专家和windoze n00b,所以如果有另一种解决方法?也许将Maven指向正确的位置?其他符号链接工具?
谢谢大家!