【问题标题】:How to integrate Amazon Game Circle using Ant?如何使用 Ant 集成 Amazon Game Circle?
【发布时间】:2014-01-15 19:34:21
【问题描述】:

我有一个使用 Ant 编译的 Android 游戏,我尝试集成它 与亚马逊游戏圈。我的项目和 GameCircleSDK 在 结构:均包含jni/、libs/、res/等标准目录 对于安卓。集成 Game Circle,Amazon's documentation 只需触摸 Eclipse 并指示 在工作区中包含 Game Circle 并将其添加为依赖项。

在 Ant 中这个等价物是什么?我想把 Game Circle 排除在外 我的源代码树并仍然对其进行编译,获取所有 JAR 和资源。

build.xml 和我目前使用的其他构建文件是android create project 生成的默认文件。我在这里发布以供参考(删除了默认的 cmets):

<?xml version="1.0" encoding="UTF-8"?>
<project name="Game" default="help">
    <property file="local.properties" />
    <property file="ant.properties" />

    <property environment="env" />
    <condition property="sdk.dir" value="${env.ANDROID_HOME}">
        <isset property="env.ANDROID_HOME" />
    </condition>
    <loadproperties srcFile="project.properties" />

    <fail
            message="sdk.dir is missing."
            unless="sdk.dir"
    />

    <import file="custom_rules.xml" optional="true" />
    <import file="${sdk.dir}/tools/ant/build.xml" />
</project>

【问题讨论】:

  • 我不是蚂蚁专家,但在这里发布您的构建 XML 可能会有所帮助。

标签: java android ant kindle-fire


【解决方案1】:

你是这样做的:

  1. 在project.properties 中添加SDK 作为参考。路径必须是相对的。

    android.library.reference.1=../../relative/path/to/gamecircle
  2. 通过运行 android update lib-project -p /path/to/gamecircle 将 build.xml 添加到 GameCircle。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-01-26
    • 2015-09-22
    • 1970-01-01
    • 2019-12-06
    • 1970-01-01
    • 2019-05-23
    • 1970-01-01
    相关资源
    最近更新 更多