我需要使用angularjs構建phonegap應用程序。 所以我選擇離子框架。這些都是我到目前爲止所做的步驟。使用離子建設phonegap應用程序時出錯
- 設置java,ant,adt及其路徑。
使用命令
NPM安裝-g離子
開始離子項目uisng
離子 離子開始EX1
添加離子平臺
離子平臺添加安裝離子android
構建使用命令
離子構建Android
但是這樣做的建築,它顯示錯誤。
BUILD FAILED
C:\Android\adt-bundle\sdk\tools\ant\build.xml:932: The following error occurred
while executing this line:
C:\Android\adt-bundle\sdk\tools\ant\build.xml:950: null returned: -1073741819
Total time: 11 seconds
C:\Android\fresh\platforms\android\cordova\node_modules\q\q.js:126
throw e;
^
Error code 1 for command: cmd with args: /s,/c,ant,debug,-f,C:\Android\fresh\pla
tforms\android\build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen
我還沒有修改任何代碼。和Apache的螞蟻和Java也在工作。爲什麼這個錯誤?
在C的含量:\的Android \ ADT-束\ SDK \工具\螞蟻\ build.xml文件添加下面
line 930 <target name="-package-resources" depends="-crunch">
<!-- only package resources if *not* a library project -->
line 932 <do-only-if-not-library elseText="Library project: do not package resources..." >
<aapt executable="${aapt}"
command="package"
versioncode="${version.code}"
versionname="${version.name}"
debug="${build.is.packaging.debug}"
manifest="${out.manifest.abs.file}"
assets="${asset.absolute.dir}"
androidjar="${project.target.android.jar}"
apkfolder="${out.absolute.dir}"
nocrunch="${build.packaging.nocrunch}"
resourcefilename="${resource.package.file.name}"
resourcefilter="${aapt.resource.filter}"
libraryResFolderPathRefid="project.library.res.folder.path"
libraryPackagesRefid="project.library.packages"
libraryRFileRefid="project.library.bin.r.file.path"
previousBuildType="${build.last.target}"
buildType="${build.target}"
line 950 ignoreAssets="${aapt.ignore.assets}">
<res path="${out.res.absolute.dir}" />
<res path="${resource.absolute.dir}" />
<!-- <nocompress /> forces no compression on any files in assets or res/raw -->
<!-- <nocompress extension="xml" /> forces no compression on specific file extensions in assets and res/raw -->
</aapt>
</do-only-if-not-library>
</target>
謝謝,一千倍,謝謝。 – 2014-12-17 19:08:08