【问题标题】:Upload fails on google play even after adding android:debuggable="false"即使添加了 android:debuggable="false",Google Play 上的上传也会失败
【发布时间】:2017-01-03 23:47:03
【问题描述】:

我正在尝试将我的 apk 上传到谷歌商店,它说您上传了一个可调试的 APK。出于安全原因,您需要先禁用调试,然后才能在 Google Play 中发布它。

我添加了 android:debuggable="false" 并且我正在使用唯一密钥在发布模式下对其进行签名,但我仍然收到错误消息。我正在使用 xamarin 构建

<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.mycompApp.MyApp" android:versionCode="1" android:versionName="1.0" android:installLocation="auto">
<application android:label="MyApp" android:icon="@drawable/Icon" android:hardwareAccelerated="true" android:debuggable="false">
    <activity android:name=".MainActivity" android:label="MainActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"></activity>
    <!-- Only C2DM servers can send messages for the app. If permission is not set - any other app can generate it -->
</application>
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="14" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_CALENDAR" />
<uses-permission android:name="android.permission.WRITE_CALENDAR" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_OWNER_DATA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

【问题讨论】:

  • debuggable=false 是默认值,因此您不需要自己包含它。也许您的 ant-build 的某些操作正在重置此标志?
  • 如何检查?我正在使用 xamarin 创建构建。我指向发布模式并创建构建
  • “使用 xamarin 构建”部分一定有问题。有一些关于可调试here 的文档
  • 我已经按照那里定义的所有步骤进行了构建,然后构建了它。事实上,我什至尝试手动签名并上传,但我遇到了同样的问题

标签: android xamarin xamarin.android android-manifest


【解决方案1】:

问题是 androidmanifest.xml 显示了一些 windows 编码,这并没有在 xamarin 中引发任何错误。我把它改成 utf-8 并上传了

【讨论】:

    【解决方案2】:

    Xamarin Studio 并不总是更新 AndroidManifest 中的良好更改。我可以通过手动删除项目目录中的Droid/obj/Release/android 文件夹,然后清理+构建+包来解决相同的问题。新包已被 Google Play 接受。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-11-11
      • 1970-01-01
      • 2014-11-13
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多