简体   繁体   English

安装应用程序被播放保护阻止

[英]installation app blocked by play protect

When trying to install a signed application (app-release.apk), a "Blocked by Play Protect" alert is shown and the app is not installed.尝试安装已签名的应用程序 (app-release.apk) 时,会显示“已被 Play Protect 阻止”警告,并且该应用程序未安装。 However, an unsigned application (app-debug.apk) can be installed without problems.但是,可以毫无问题地安装未签名的应用程序 (app-debug.apk)。

The error message:错误信息:

Play Protect doesn't recognise this app's developer. Play Protect 无法识别此应用的开发者。 Apps from unknown developers can sometimes be unsafe.来自未知开发者的应用程序有时可能不安全。

Why this error happened?为什么会发生这个错误? What's the solution?解决办法是什么?

错误的图像

I found the solution: Go to the link below and submit your application.我找到了解决方案:转到下面的链接并提交您的申请。

Play Protect Appeals Submission Form Play Protect 上诉提交表

After a few days, the problem will be fixed几天后,问题将得到解决

I've found the better solution. 我找到了更好的解决方案。 If you want to conquer this problem you should open your play store, in menu find Play Protect 如果你想要解决这个问题,你应该打开你的游戏商店,在菜单中找到Play Protect 这里 and 这里 and uncheck Scan device for security threats . 并取消选中扫描设备以查找安全威胁

Try to create a new key store and replace with old one, then rebuild a new signed APK.尝试创建一个新的密钥存储并替换为旧的,然后重建一个新的签名 APK。

Update: Note that if you're using a http connection with server ,you should use SSL.更新:请注意,如果您使用与服务器的 http 连接,则应使用 SSL。

Take a look at: https://developer.android.com/distribute/best-practices/develop/understand-play-policies看一看: https : //developer.android.com/distribute/best-practices/develop/understand-play-policies

There are three options to get rid of this warning:有三个选项可以消除此警告:

  1. You need to disable Play Protect in Play Store -> Play Protect -> Settings Icon -> Scan Device for security threats您需要在 Play 商店 -> Play Protect -> 设置图标 -> 扫描设备安全威胁中禁用 Play Protect
  2. Publish app at Google Play Store在 Google Play 商店发布应用
  3. Submit an Appeal to the Play Protect . 向 Play Protect提交上诉

Google play finds you as developer via your keystore . Google Play 通过您的密钥库找到您作为开发人员。

and maybe your country IP is banned on Google when you generate your new keystore.并且当您生成新的密钥库时,您的国家/地区 IP 可能在 Google 上被禁止。

change your IP Address and generate new keystore, the problem will be fixed.更改您的 IP 地址并生成新的密钥库,问题将得到解决。

if you didn't succeed, use another Gmail in Android Studio and generate new keystore.如果没有成功,请在 Android Studio 中使用另一个 Gmail 并生成新的密钥库。

I am adding this answer for others who are still seeking a solution to this problem if you don't want to upload your app on playstore then temporarily there is a workaround for this problem.如果您不想在 Playstore 上上传您的应用程序,我正在为仍在寻求解决此问题的其他人添加此答案,然后暂时有此问题的解决方法。

Google is providing safety device verification api which you need to call only once in your application and after that your application will not be blocked by play protect: Google 正在提供安全设备验证 api,您只需在应用程序中调用一次,之后您的应用程序将不会被播放保护阻止:

Here are there the links:这里有链接:

https://developer.android.com/training/safetynet/attestation#verify-attestation-response https://developer.android.com/training/safetynet/attestation#verify-attestation-response

Link for sample code project:示例代码项目的链接:

https://github.com/googlesamples/android-play-safetynet https://github.com/googlesamples/android-play-safetynet

the only solution worked for me was using java keytool and generating a .唯一对我有用的解决方案是使用 java keytool 并生成一个 . keystore file the command line and then use that .keystore file to sign my app keystore文件命令行,然后使用该.keystore文件来签署我的应用程序

you can find the java keytool at this directory C:\\Program Files\\Java\\jre7\\bin您可以在此目录C:\\Program Files\\Java\\jre7\\bin找到 java keytool

open a command window and switch to that directory and enter a command like this打开命令窗口并切换到该目录并输入这样的命令

keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000

Keytool prompts you to provide passwords for the keystore, your name , company etc . Keytool 会提示您提供密钥库的密码、您的姓名、公司等。 note that at the last prompt you need to enter yes.请注意,在最后一个提示中,您需要输入 yes。

It then generates the keystore as a file called my-release-key.keystore in the directory you're in. The keystore and key are protected by the passwords you entered.然后它在您所在的目录中生成一个名为 my-release-key.keystore 的文件作为密钥库。密钥库和密钥受您输入的密码保护。 The keystore contains a single key, valid for 10000 days.密钥库包含一个密钥,有效期为 10000 天。 The alias is a name that you — will use later, to refer to this keystore when signing your application.别名是您稍后将使用的名称,用于在签署您的应用程序时引用此密钥库。

For more information about Keytool, see the documentation at: http://docs.oracle.com/javase/6/docs/technotes/tools/windows/keytool.html有关 Keytool 的更多信息,请参阅以下文档: http : //docs.oracle.com/javase/6/docs/technotes/tools/windows/keytool.html

and for more information on signing Android apps go here: http://developer.android.com/tools/publishing/app-signing.html有关签署 Android 应用程序的更多信息,请访问: http : //developer.android.com/tools/publishing/app-signing.html

If you are using some trackers like google analytics or amplitude and you are trying to release your app in another platforms other than Google Play , this errors appears for users.如果您正在使用一些跟踪器,例如google analyticsamplitude并且您尝试在Google Play以外的其他平台上发布您的应用程序,则会向用户显示此错误。 So there are two possible solutions:所以有两种可能的解决方案:

  1. Use special trackers in your app (firebase and appmetrica are tested and are ok)在您的应用程序中使用特殊跟踪器(firebase 和 appmetrica 已经过测试并且没问题)
  2. Release your app in Google PlayGoogle Play发布您的应用

the solution lies in creating a new key when generating the signed apk.解决方案在于在生成签名的 apk 时创建一个新密钥。 this worked for me without a fuss.这对我有用,没有大惊小怪。

  1. click on Build点击构建
  2. click generate signed Bundle/APK...单击生成签名包/APK...
  3. choose either Bundle / APK (in my case APK) and click Next选择 Bundle / APK(在我的情况下为 APK),然后单击下一步
  4. click on create new (make sure you have a keystore path on the machine)单击新建(确保您在机器上有一个密钥库路径)
  5. after everything, click finish to generate your signed apk完成后,单击完成以生成已签名的 apk

when you install, the warning will not come.安装时,警告不会出现。

it is due to expired of debug certificate simply delete the debug.keystore located at这是由于调试证书过期只需删除位于的debug.keystore

C:\Users\.android\

after that build your project the build tools will regenerate a new key and it will work fine.在构建您的项目之后,构建工具将重新生成一个新密钥,它会正常工作。 here is a reference:这是一个参考:

https://developer.android.com/studio/publish/app-signing

I solved this problem by changing my application package name according to signature certificate details.我通过根据签名证书详细信息更改我的应用程序包名称解决了这个问题。 At first I created application with com.foo.xyz but my certificate organization was 'bar'.起初我用 com.foo.xyz 创建了应用程序,但我的证书组织是“bar”。 So I change my package name to com.bar.xyz and now there is no google play protect warning!所以我将包名更改为 com.bar.xyz,现在没有 google play 保护警告!

There is no very precise way to solve this problem, but the following tasks can be effective in solving the problem没有很精确的方法来解决这个问题,但是以下任务可以有效地解决这个问题

  • Click Invalid Caches/Restart单击无效缓存/重新启动

  • Do the login process of Android Studio做Android Studio的登录过程

  • Click generate signed Bundle / APK点击生成签名包/APK

  • Fill in all the "generate signed Bundle" information completely.完整填写所有“生成签名捆绑包”信息。

  • Do not use the same password.不要使用相同的密码。 Make sure your passwords are different in "generate signed Bundle" different.确保您的密码在“生成签名捆绑包”中不同。 Preferably enter the address of America with the code 01最好用代码 01 输入美国的地址

  • It is probably sensitive to Persian, so it is better not to write in Persian in the program.可能对波斯语比较敏感,所以程序中最好不要用波斯语写。 Write the program menu in English and make it Persian in the next updates用英文编写程序菜单,并在下次更新时使用波斯语

  • Remove extra permissions删除额外权限

  • Finally, go to the site below and request a troubleshooting https://support.google.com/googleplay/android-developer/answer/2992033?hl=en最后,转到以下站点并请求故障排除https://support.google.com/googleplay/android-developer/answer/2992033?hl=en

  • Fill in the first and last name correctly正确填写名字和姓氏

  • Upload the installation file, for example, in Dropbox, and copy the link上传安装文件,例如在Dropbox中,并复制链接

  • If you are using Dropbox, be sure to change the number zero at the end of the link to one , then submit it or use link shortening sites.如果您使用的是 Dropbox,请务必将链接末尾的数字0更改为1 ,然后提交或使用链接缩短站点。

  • If your request is not approved, shorten the link of the installation file, for example, using the https://bit.ly site如果您的请求未获批准,请缩短安装文件的链接,例如使用https://bit.ly站点

  • In the description section, explain the problem.在描述部分,解释问题。 For your convenience, I will leave a sample text for you :为了您的方便,我会为您留下一个示例文本:

     Greetings to the esteemed Google Team I am sending this request to fix the "Blocked by Pay Protect" error ****{Write your app info and your reasons}**** Fast, simple, free and lightweight, no annoying ads ,This app does not collect and store user data! Also, no unnecessary cost is imposed on the user and is completely free , It also certifies that this app does not harm user privacy and is not harmful to users Thank you
  • If you did not receive the confirmation email, repeat the request again a few days later如果您没有收到确认电子邮件,请在几天后再次请求

If there were hardware changes, try to re-download or re-create jks file.如果有硬件更改,请尝试重新下载或重新创建 jks 文件。

I also faced such problem, it occured after moving my SSD from one PC to another.我也遇到过这样的问题,它是在将我的 SSD 从一台 PC 移动到另一台之后发生的。 This gave a hint that there were no need to send the app to Google for verification: an old apk file was installing with no warning.这暗示无需将应用程序发送给 Google 进行验证:正在安装一个旧的 apk 文件而没有任何警告。 So I replaced an android.jks on my hard drive with the one from the cloud, created a signed apk and the problem has gone.所以我用云中的那个替换了我硬盘上的 android.jks,创建了一个签名的 apk,问题就解决了。

I kept getting this issue after installing my app on a real device for debug.在将我的应用程序安装在真实设备上进行调试后,我一直遇到此问题。

在此处输入图像描述

And the problem was that I had android:exported="true" attribute present on the main activity in manifest file.问题是我在清单文件的主要活动中存在android:exported="true"属性。 I removed it and Play Protect warning disappeared.我删除了它,Play Protect 警告消失了。

This error usually happens if you try to install an app from.apk file.如果您尝试从 .apk 文件安装应用程序,通常会发生此错误。 The first thing you can do is to disable Play Protect from the inside of Play Store app in your phone:您可以做的第一件事是从手机的 Play 商店应用程序内部禁用 Play Protect:

Open Google Play Store app --> Play Protect --> Click Settings Icon on the top --> Disable scanning apps for security打开 Google Play Store 应用程序 --> Play Protect --> 单击顶部的设置图标 --> 禁用扫描应用程序以确保安全

Note: It is recommended that you enable it back again after finishing installation for security purposes.注意:为了安全起见,建议您在完成安装后重新启用它。

Now after this you should be able to install the app.在此之后,您应该可以安装该应用程序了。 If you still receive error saying something like Error, app was not installed when you click on the.apk file, it means you have installed version of that app already.如果您在单击 .apk 文件时仍然收到类似“错误,未安装应用程序”之类的错误消息,则表示您已经安装了该应用程序的版本。 Uninstall the app first then you can install the app from.apk file without problem.先卸载该应用程序,然后您可以毫无问题地从 .apk 文件安装该应用程序。

Not the solution, but you can use debug key for signing release builds to avoid blocking the installation from Google Play Protect.不是解决方案,但您可以使用调试密钥对发布版本进行签名,以避免阻止来自 Google Play Protect 的安装。 It looks like Play Protect doesn't warn for builds signed with automatically generated debug.keystore .看起来 Play Protect 不会警告使用自动生成的debug.keystore签名的构建。

Note that your debug builds are not unsigned , they are just signed with a debug key.请注意,您的调试版本不是unsigned ,它们只是用调试密钥签名。

Of course, you cannot use the build for production distribution (Google Play, Amazon, etc.), but it's still worth for pre-production internal testing which requires a high-frequency feedback loop.当然,您不能将构建用于生产分发(Google Play、Amazon 等),但它仍然值得用于需要高频反馈循环的预生产内部测试。

You can add a task to build release with debug.keystore by adding the configuration in build.gradle , something like:您可以通过在build.gradle添加配置来添加任务以使用 debug.keystore 构建发布,例如:

android {
  buildTypes {
    // add after the `release` definition
    releaseDebugKey { initWith release }
  }

  signingConfigs {
    // use debug.keystore for releaseDebugKey builds
    releaseDebugKey { initWith debug }
  }
}

then execute ./gradlew assembleReleaseDebugKey to build a release build with debug key.然后执行./gradlew assembleReleaseDebugKey以使用调试密钥构建发布版本。

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

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