Eclipse的Andr​​oid应用:在与真正的证书签名 [英] Eclipse Android app: Run signed with real certificate

查看:126
本文介绍了Eclipse的Andr​​oid应用:在与真正的证书签名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法可以让我得到的运行按钮,使用真实的签名证书,而不是一个调试呢?我想避免安装的发展副本之前先卸载从模拟器共享用户的应用程序。

Is there a way I can get the run button to use the real signing certificate instead of a debug one? I want to avoid having to uninstall the "shared user" apps from the emulator before installing the development copy.

我已经知道我可以导出签署的副本,但我会preFER有一个自动生成签名复制/运行在模拟器

I am already aware I can export a signed copy, but I would prefer to have an automated Build Signed Copy / Run On Emulator

推荐答案

我在你使用Eclipse的假设。

I'm assuming you're using Eclipse.

首先,添加Ant的支持,您的项目,通过运行Android的更新项目-p。里面的项目目录。

First, add Ant support to your project, by running "android update project -p ." inside the project dir.

接下来,在你的build.xml中创建自定义指标,沿线(类型未测试):

Next, create custom targets in your build.xml, along the lines (typed not tested) of:

<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文件,并添加运行释放的目标到工具栏。这至少会得到安装工具栏上的工作。

You can then expand the build.xml in the files panel, and add the run-release target to your toolbar. This will at least get the install working from the toolbar.

您需要设置相应的属性来获得签约工作(key.store,key.store.password,key.alias,key.alias.password),在的建筑,从在命令行运行

You'll need to set appropriate properties to get signing working (key.store, key.store.password, key.alias, key.alias.password), as described in Building and Running from the Command Line

希望这有助于。

这篇关于Eclipse的Andr​​oid应用:在与真正的证书签名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆