关于flutter项目app上架Google Play 审核问题:
Your app(s) are using an unsafe implementation of the HostnameVerifier interface. You can find more information about how resolve the issue in this Google Help Center article. 即: 您的应用正在使用 HostnameVerifier 接口的不安全实现。您可以在这篇 Google 帮助中心文章中找到有关如何解决问题的更多信息。
首先是要定位到问题所在,到底哪里实现了不安全接口。起初毫无头绪,所以在项目中使用关键词 HostnameVerifier 进行搜索。发现了这个开关,默认是开启ON。尝试性关闭进行了打包重新上架,结果成功上架。 但是 这个 Insecure HostnameVerifier(不安全主机名验证程序) 并不清楚是什么,官方中也未暂无查到用途作用,但直觉认为不能就这样关闭。
所以再次重新检查第三方插件中什么业务用到相关内容。后来在插件flutter_braintree 中的braintree官网中发现有相关 HostnameVerifier 内容,并在https://stackoverflow.com上了解到大致是braintree sdk引起的插件漏洞问题。
我的项目开发中引用依赖版本为: flutter_braintree: ^1.0.3
查看flutter_braintree官网的changelog时发现:
1.1.0+1 # 修复 Braintree 插件中的漏洞(Play Store 问题)
虽然没具体解释,但决定升级到该版本 flutter_braintree: ^1.1.0+1。 进行Put get 过程中:
https://cardinalcommerce.bintray.com/android/org/jfrog/cardinalcommerce/gradle/cardinalmobilesdk/2.2.4-1/cardinalmobilesdk-2.2.4-1.pom ”。无法获取从服务器收到状态代码 403
Could not resolve all task dependencies for configuration ‘:app:releaseRuntimeClasspath’. Could not resolve org.jfrog.cardinalcommerce.gradle:cardinalmobilesdk:2.2.3-2. Required by: project :app > project :react-native-braintree-dropin-ui > com.braintreepayments.api:drop-in:4.6.0 > com.braintreepayments.api:three-d-secure:3.11.1 Could not resolve org.jfrog.cardinalcommerce.gradle:cardinalmobilesdk:2.2.3-2. Could not get resource ‘https://cardinalcommerce.bintray.com/android/org/jfrog/cardinalcommerce/gradle/cardinalmobilesdk/2.2.3-2/cardinalmobilesdk-2.2.3-2.pom’. Could not GET ‘https://cardinalcommerce.bintray.com/android/org/jfrog/cardinalcommerce/gradle/cardinalmobilesdk/2.2.3-2/cardinalmobilesdk-2.2.3-2.pom’. Received status code 403 from server: Forbidden Could not resolve org.jfrog.cardinalcommerce.gradle:cardinalmobilesdk:2.2.3-2. Could not get resource ‘https://cardinalcommerce.bintray.com/android/org/jfrog/cardinalcommerce/gradle/cardinalmobilesdk/2.2.3-2/cardinalmobilesdk-2.2.3-2.pom’. Could not GET ‘https://cardinalcommerce.bintray.com/android/org/jfrog/cardinalcommerce/gradle/cardinalmobilesdk/2.2.3-2/cardinalmobilesdk-2.2.3-2.pom’. Received status code 403 from server: Forbidden Could not resolve org.jfrog.cardinalcommerce.gradle:cardinalmobilesdk:2.2.3-2. Could not get resource ‘https://cardinalcommerce.bintray.com/android/org/jfrog/cardinalcommerce/gradle/cardinalmobilesdk/2.2.3-2/cardinalmobilesdk-2.2.3-2.pom’. Could not GET ‘https://cardinalcommerce.bintray.com/android/org/jfrog/cardinalcommerce/gradle/cardinalmobilesdk/2.2.3-2/cardinalmobilesdk-2.2.3-2.pom’. Received status code 403 from server: Forbidden```
解决办法:再集成过程中 可参考 Could not resolve cardinalmobilesdk Required by: braintreepayments:5.2.1( In provided Demo Project as well) #246
在Android主 build.gradle 中添加如下代码
repositories {
maven {
url "https://cardinalcommerceprod.jfrog.io/artifactory/android"
credentials {
username 'braintree_team_sdk'
password 'AKCp8jQcoDy2hxSWhDAUQKXLDPDx6NYRkqrgFLRc3qDrayg6rrCbJpsKKyMwaykVL8FWusJpp'
}
}
}
|