签署apk的 - 这是什么意思?我该怎么办呢? [英] Signing apk's - what does it mean and how do I do it?

查看:189
本文介绍了签署apk的 - 这是什么意思?我该怎么办呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我问其唯一建议答案涉及以下问题上的SO :在注册调试证书,并使用调试API密钥。

不幸的是我几乎不知道是什么意思和无法捉摸如何做到这一点。我看过这个谷歌页面,但它似乎承担了部分先验知识而我没有,它没有给出例子。是否有一个友好的指导的地方,能不能帮我?

编辑:我的最终目的是能够调试应用程序签署

编辑:通常,当我要调试的应用程序,我可以在的查看日食源运行的应用程序,然后设置一些破发点。然后我运行应用程序,并可以通过code无论是一行行跳跃或从一个断点到下一步。在这个(或类似),这样的问题我已经看到了通过使用Eclipse的DDMS视图,运行已经出口,并签署APK,然后附加调试程序的过程中调试的讨论。这是混淆了我,因为我无法捉摸怎么永远能看到相应的源$ C ​​$ C设置断点......还我的程序启动后很快坠毁pretty - 我的猜测可能会增加的难度调试这种方式。


解决方案

本手册是非常明显的。请注明您卡住与您携手trought后哪些部分,我建议:

http://developer.android.com/guide/publishing/app- signing.html

好吧,小概述,没有提及或者Eclipse周围,所以离开的错误一定的空间,但它是这样工作的。


  • 在打开文摘项目

  • preSS鼠标右键,工具(Android的工具?) - >出口签名的应用程序(?APK)

  • 走线槽的向导:

  • 请一个新的密钥存储。记住密码

  • 登入您的应用程序

  • 保存等。

此外,从链接:


  

编译和使用Eclipse ADT签署


  
  

如果您使用的是Eclipse的ADT
  插件,你可以使用导出向导
  导出一个签名的apk(甚至
  创建一个新的密钥库,如果需要的话)。
  导出向导执行所有
  用keytool互动,
  的jarsigner对你来说,它允许你
  使用GUI代替签名包
  的执行程序手动
  编译,签名,并调整,如论述
  以上。一旦向导编译
  并签署了您的包,它也将
  perfom与包对齐
  的zipalign。由于导出向导
  同时使用的keytool和的jarsigner,你
  应确保他们都可以访问
  您的计算机上,如上所述
  在签名的基本设置。


  
  

要在创建签名并对齐的apk
  月蚀:


  
  

      
  1. 选择在Package Explorer中的项目,然后选择文件>
      导出。

  2.   
  3. 打开Android文件夹,选择Export Android应用程序,然后单击
      下一步。


      
      

    导出Android应用程序向导从现在开始,这将引导
      您完成签署过程
      您的应用程序,包括步骤
      选择私钥与
      签署.apk文件(或创建一个新的
      密钥库和私钥)。


  4.   
  5. 完成导出向导,你的应用程序将被编译,
      签署,对齐,并准备
      分布。

  6.   

编辑:

DDMS不是源$ C ​​$ C调试器,它提供了:


  • 端口转发服务

  • 设备上的屏幕捕获

  • 线程,在设备上堆信息

  • logcat中,进程,射频状态信息

  • 来电和短信欺骗

  • 位置数据欺骗

在另一方面,与Eclipse您可以在code设置断点。

I asked a question on SO for which the only suggested answer involved the following: "register the debug certificate and use that debug api key."

Unfortunately I scarcely know what that means and can not fathom how to do it. I did read this google page, but it appears to assume some prior knowledge which I don't have, and it gives no examples. Is there a friendlier guide somewhere that could help me?

EDIT: my ultimate aim is to be able to debug a signed app.

EDIT: Normally when I want to debug an app I can view the source in eclipse before running the app and then set some break points. Then I run the app and can step through the code either line by line or jumping from one breakpoint to the next. In this (and similar) SO questions I have seen discussions of debugging via using eclipse's DDMS view, running an already exported and signed apk and then "attaching" the debugger to the process. This is confusing me because I can not fathom how I ever get to see the corresponding source code to set up breakpoints... also my program crashed pretty quickly after starting - which I guess could add to the difficulty in debugging this way.

解决方案

The manual is clear enough. Please specify what part you get stuck with after you work trought it, I'd suggest:

http://developer.android.com/guide/publishing/app-signing.html

Ok, a small overview, without reference or eclipse around, so leave some space for errors, but it works like this

  • open your project in eclips
  • press right-mouse, tools (android tools?) - > export signed application (apk?)
  • go trough the wizzard:
  • make a new key-store. remember that password
  • sign your app
  • save it etc.

Also, from the link:

Compile and sign with Eclipse ADT

If you are using Eclipse with the ADT plugin, you can use the Export Wizard to export a signed .apk (and even create a new keystore, if necessary). The Export Wizard performs all the interaction with the Keytool and Jarsigner for you, which allows you to sign the package using a GUI instead of performing the manual procedures to compile, sign, and align, as discussed above. Once the wizard has compiled and signed your package, it will also perfom package alignment with zipalign. Because the Export Wizard uses both Keytool and Jarsigner, you should ensure that they are accessible on your computer, as described above in the Basic Setup for Signing.

To create a signed and aligned .apk in Eclipse:

  1. Select the project in the Package Explorer and select File > Export.
  2. Open the Android folder, select Export Android Application, and click Next.

    The Export Android Application wizard now starts, which will guide you through the process of signing your application, including steps for selecting the private key with which to sign the .apk (or creating a new keystore and private key).

  3. Complete the Export Wizard and your application will be compiled, signed, aligned, and ready for distribution.

EDIT:

DDMS is not a source code debugger, it provides:

  • port-forwarding services
  • screen capture on the device
  • thread and heap information on the device
  • logcat, process, and radio state information
  • incoming call and SMS spoofing
  • location data spoofing

On the other hand, with Eclipse you can set breakpoints in your code.

这篇关于签署apk的 - 这是什么意思?我该怎么办呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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