简体   繁体   English

是否可以在debuging时更改android上的所有者(用户)?

[英]Is it possible to change owner (user) on android while debuging?

I got a problem: I'm debugging the project which uses Google Play Cloud Saving and Google Play In-App Billing. 我遇到了一个问题:我正在调试使用Google Play云节省和Google Play应用内结算的项目。 But I can't debug my code 'cos I have STATUS_DEVELOPER_ERROR (developer can't use the features of google play). 但是我无法调试我的代码'因为我有STATUS_DEVELOPER_ERROR(开发人员无法使用google play的功能)。

How to fix it? 怎么解决? Can I change user on my phone? 我可以在手机上更换用户吗? I'm using the same as a developer and my phone android user. 我使用相同的开发人员和我的手机Android用户。 I have several account but I can't change the other by default. 我有几个帐户,但默认情况下我无法更改另一个帐户。 Or may be does somebody know best practices? 或者可能有人知道最佳做法吗?

This is very uncomfortable for a developer. 这对开发人员来说非常不舒服。

While I'm waiting the answer I'd like to presend my own solution which can help to test (not debug) the application you develop: 当我在等待答案时,我想预先发布我自己的解决方案,它可以帮助您测试(而不是调试)您开发的应用程序:

Upload simple "Hello world" project with package name you want with 使用您想要的包名称上传简单的“Hello world”项目

in your own developer console. 在您自己的开发人员控制台 Take some resourses customization, etc. 采取一些资源定制等。

  1. Public your project (you can download it from Google Play). 公开您的项目(您可以从Google Play下载)。
  2. Than in Google Play in your android device set the other user as default (press menu button). 在Android设备中比在Google Play中将其他用户设置为默认用户(按菜单按钮)。 //here we changed the owner of application //这里我们更改了应用程序的所有者
  3. Install from Google Play the project. 从Google Play安装项目。
  4. So after that you have to create APK with code you want this the same fingerprint.//here we released new version 所以在那之后你必须用你想要的代码创建APK这个相同的指纹//我们发布了新版本
  5. Copy apk file into device. 将apk文件复制到设备中。
  6. Update(install the APK) the application.//here we updated the app. 更新(安装APK)应用程序//我们更新了应用程序。

SO now you can test your application but not debug it. 所以现在你可以测试你的应用程序但不能调试它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM