在签名的发行版本,为什么不能谷歌的市场结算样品构建? [英] Why Can't Google's Market Billing Sample Build in a Signed Release Version?

查看:126
本文介绍了在签名的发行版本,为什么不能谷歌的市场结算样品构建?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图寻找到<一个href="http://stackoverflow.com/questions/8059719/unable-to-execute-dex-multiple-dex-files-define">similar问题,但提供有解决方案似乎并不适合我的特殊情况:

I tried looking into similar problems, but the solutions offered there do not seem to fit my particular situation:

我最初遵循的<一个说明书href="http://developer.android.com/guide/market/billing/billing_integrate.html#billing-download">Configuring和构建示例应用程序应用内计费,更换与谷歌的开发者帐户的公开密钥的安全密钥,并从 com.example 更改包名 com.billtheape

I initially followed the instructions for Configuring and building the sample application for In-app Billing, replacing the security key with the public key from Google's Developer account and changing the package name from com.example to com.billtheape.

我然后建立一个非发布版本,并运行了健康检查在我的Andr​​oid手机。一切都OK(除访问当然Android Market的服务器,因为按照设计,只用签名的发行版本的作品)。

I then built a non-release version and ran a "sanity check" on my Android phone. Everything went OK (except for accessing the Android Market server, of course, since by design it only works with a signed release version).

然后我试图建立一个签名的发行版,但收到的错误:

Then I tried to build a signed release version, but received the error:

[2012-01-03 20:52:45 - Dex Loader] Unable to execute dex: 
  Multiple dex files define Lcom/android/vending/billing/IMarketBillingService;

[2012-01-03 20:52:45 - Dungeons] Conversion to Dalvik format failed: 
  Unable to execute dex: Multiple dex files define Lcom/android/vending/billing/IMarketBillingService;

现在的问题是,即使是调试版建筑产生的,无论多少次,我试图清理项目同样的错误。

The problem now is that even the "debug version" building generated the same error, regardless of how many times I tried to clean the project.

这不看我像一个构建路径问题,在这个意义上公认的答案描述(我检查过了,但是没有找到任何可疑)。所以,我想别的东西:

This didn't look to me like a Build Path issue in the sense that the accepted answer described (I checked that, too, but couldn't find anything suspicious). So I tried something else:

  1. 已退出的Eclipse
  2. 斑点的下的子目录中 %ANDROID_HOME%\演员\谷歌\ market_​​billing \根\ COM :(1)机器人 (2)的例子(3)billtheape
  3. 删除子目录例如
  4. 入门Eclipse和清理的项目。
  1. Exited Eclipse
  2. Spotted three subdirectories under %ANDROID_HOME%\extras\google\market_billing\gen\com: (1) android (2) example (3) billtheape
  3. Deleted the subdirectory example.
  4. Started Eclipse and cleaned the project.

Debug版本建立现在可以正确的,但签订的释放仍然会产生相同的错误。事实证明,删除了多余的子目录是不是做了什么魔法,而是重新启动Eclipse和再清洗项目。

Debug version builds now properly, but signed release still generates the same error. It turns out that deleting that extraneous subdirectory wasn't what did the magic, but rather restarting Eclipse and then cleaning the project.

确定,所以至少我得到了调试版的工作回来,但签署的释放具有相同的错误。

OK, so at least I got the "debug version" working back, but the signed release Export keeps failing with the same error.

任何想法,这是什么错误意味着,为什么会发生,以及如何解决它?

Any idea what this error means, why it happens and how to fix it?

推荐答案

简短的回答:由于Eclipse + ADT很烂。 这就是原因。

Short answer: Because Eclipse + ADT sucks. That's why.

长回答:我刚导入完全相同的项目,不同的机器有一个稍微不同的配置:Eclipse的3.6.2(而不是3.6.1在上述有问题的系统)和SDK R13 (而不是R 9中的有问题的系统)。

Longer answer: I just imported the same exact project to a different machine with a slightly different configuration: Eclipse 3.6.2 (instead of 3.6.1 in the problematic system described above) and SDK R13 (instead of R9 in the problematic system).

然后我试图将它导出,采用上述相同的具体步骤。工程就像一个魅力!

Then I tried to export it, using the same exact steps described above. Works like a charm!

这是什么?巫毒?

发生了什么事的日子,其中IDE表现得比较predictably比我试图开发软件?

What happened to the days in which the IDE behaved more predictably than the software I was trying to develop?

下一步:升级的Eclipse(3.6.2)的,有问题的系统上,看看这是否解决了该系统的问题,得

Next step: Upgrade Eclipse (to 3.6.2) only, on the problematic system and see whether this solves the problem in that system, too.

更新:我刚刚完成了违规的系统上升级的Eclipse 3.6.1到3.6.2。事实证明,这是不可能安装Eclipse 保持现有的ADT。 https://dl-ssl.google.com/android/eclipse/ 强制用户安装的最新&安培;最大即使你想以其他方式(配置管理与;跟踪的原因,例如)。因此,随着新的的Eclipse 3.6.2 ADT 16.0.0.v201112150204-238534 为好。工程就像一个魅力!

Update: I just finished updating Eclipse 3.6.1 to 3.6.2 on the offending system. It turns out that it is impossible to install Eclipse and keep the existing ADT. https://dl-ssl.google.com/android/eclipse/ forces you to install "the latest & greatest" even if you want otherwise (for configuration management & tracking reasons for example). So with the new Eclipse 3.6.2 I got ADT 16.0.0.v201112150204-238534 as well. Works like a charm!

的根本原因和解释相结合的古怪行为的Eclipse 3.6.1 + ADT 9.0.1.v201101191456-93220 将永远不会知道......这是一个组合与开发者应该(和做)发布的商业级应用程序到Android Market在某个时间点。 <一href="http://stackoverflow.com/search?q=%5Bandroid%5D%20where%20is%20default.properties?">Amazing.

The root cause and explanation for the odd behavior of the combination Eclipse 3.6.1 + ADT 9.0.1.v201101191456-93220 will never be known... and this is a combo with which developers were supposed to (and did) release commercial grade apps to the Android Market at some point in time. Amazing.

这篇关于在签名的发行版本,为什么不能谷歌的市场结算样品构建?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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