我正在尝试使用ant构建我的android项目,因为我必须使用批处理来构建流程。
但'ant debug'对我不起作用。它停止在未解析导入包的java代码编译中。
我用eclipse构建了相同的项目,它工作正常。 所有的罐子都在libs文件夹中,甚至认为'ant'无法找到库。
以下是终端输出
AmanMacbook:android tpfmacbookpro1$ ant debug
Buildfile: /Aman/Tegra/workspace_PM/bld_pm_cityskateboarding/android/build.xml
-set-mode-check:
-set-debug-files:
-check-env:
[checkenv] Android SDK Tools Revision 22.3.0
[checkenv] Installed at /Aman/Tegra/android-sdk-macosx
-setup:
[echo] Project Name: PZPlayer
[gettype] Project Type: Application
-set-debug-mode:
-debug-obfuscation-check:
-pre-build:
-build-setup:
[getbuildtools] Using latest Build Tools: 19.0.1
[echo] Resolving Build Target for PZPlayer...
[gettarget] Project Target: Android 4.1.2
[gettarget] API level: 16
[echo] ----------
[echo] Creating output directories if needed...
[mkdir] Created dir: /Aman/Tegra/workspace_PM/bld_pm_cityskateboarding/android/bin/rsObj
[mkdir] Created dir: /Aman/Tegra/workspace_PM/bld_pm_cityskateboarding/android/bin/rsLibs
[echo] ----------
[echo] Resolving Dependencies for PZPlayer...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------
[echo] ----------
[echo] Building Libraries with 'debug'...
[subant] No sub-builds to iterate on
-code-gen:
[mergemanifest] No changes in the AndroidManifest files.
[echo] Handling aidl files...
[aidl] Found 1 AIDL files.
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files...
[echo] ----------
[echo] Handling Resources...
[aapt] No changed resources. R.java and Manifest.java untouched.
[echo] ----------
[echo] Handling BuildConfig class...
[buildconfig] Generating BuildConfig class.
-pre-compile:
-compile:
[javac] Compiling 85 source files to /Aman/Tegra/workspace_PM/bld_pm_cityskateboarding/android/bin/classes
[javac] /Aman/Tegra/workspace_PM/bld_pm_cityskateboarding/android/src/com/kayabit/AppLovinX/AppLovinXBridge.java:12: package com.applovin does not exist
[javac] import com.applovin.*;
[javac] ^
[javac] /Aman/Tegra/workspace_PM/bld_pm_cityskateboarding/android/src/com/kayabit/PlayHavenX/PlayHavenXBridge.java:9: package com.playhaven does not exist
[javac] import com.playhaven.*;
[javac] ^
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] 2 errors
BUILD FAILED
/Aman/Tegra/android-sdk-macosx/tools/ant/build.xml:720: The following error occurred while executing this line:
/Aman/Tegra/android-sdk-macosx/tools/ant/build.xml:734: Compile failed; see the compiler error output for details.