Eclipse Android 应用程序:使用真实证书签名运行

2023-12-30

有没有一种方法可以让运行按钮使用真正的签名证书而不是调试证书?我想避免在安装开发副本之前从模拟器中卸载“共享用户”应用程序。

我已经知道我可以导出签名副本,但我更喜欢自动构建签名副本/在模拟器上运行


我假设您正在使用 Eclipse。

首先,通过运行“android update project -p”向您的项目添加 Ant 支持。在项目目录内。

接下来,在 build.xml 中创建自定义目标,如下所示(键入未测试):

<target name="install-release" depends="release">
    <sequential>
        <echo>Installing ${out.release.file} onto default emulator or device...</echo>
        <exec executable="${adb}" failonerror="true">
            <arg line="${adb.device.arg}" />
            <arg value="install" />
            <arg value="-r" />
            <arg path="${out.release.file}" />
        </exec>
    </sequential>
</target>

<target name="run-release" depends="install-release">
    <!-- not sure what goes here -->
</target>

然后,您可以在文件面板中展开 build.xml,并将运行发布目标添加到工具栏。这至少可以让安装从工具栏开始工作。

您需要设置适当的属性才能进行签名(key.store、key.store.password、key.alias、key.alias.password),如中所述从命令行构建和运行 http://developer.android.com/guide/developing/building/building-cmdline.html

希望这可以帮助。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Eclipse Android 应用程序:使用真实证书签名运行 的相关文章

随机推荐