java - 使用 Android Emulator 启动项目时出现认证错误
问题描述
我正在尝试在连接在代理后面的公司 MAC 笔记本电脑上启动默认的颤振应用程序。
在我的 Android Studio(连接到 Android Emulator API 28(也尝试过 API 30))上单击调试后,我
收到以下错误:
以调试模式在 IA 模拟器上的 AOSP 上启动 lib/main.dart... 运行 Gradle 任务“assembleDebug”...
FAILURE:构建失败并出现异常。
- 出了什么问题:任务':app:checkDebugAarMetadata'的执行失败。
无法解析配置“:app:debugRuntimeClasspath”的所有文件。无法解析 io.flutter:flutter_embedding_debug:1.0.0-0fdb562ac8068ce3dda6b69aca3f355f4d1d2718。要求:项目:app > 无法解析 io.flutter:flutter_embedding_debug:1.0.0-0fdb562ac8068ce3dda6b69aca3f355f4d1d2718。> 无法获取资源 'https://storage.googleapis.com/download.flutter.io/io/flutter/flutter_embedding_debug/1.0.0-0fdb562ac8068ce3dda6b69aca3f355f4d1d2718/flutter_embedding_debug-1.0.0-0fdb562ac8068ce3dda6b69aca3f355555555 > 无法获取'https://storage.googleapis.com/download.flutter.io/io/flutter/flutter_embedding_debug/1.0.0-0fdb562ac8068ce3dda6b69aca3f355f4d1d2718/flutter_embedding_debug-1.0.0-0fdb562ac8068ce3dda6b69aca3f3555555555 > PKIX 路径构建失败:sun.security.provider。certpath.SunCertPathBuilderException:无法找到请求目标的有效证书路径无法解析 io.flutter:x86_debug:1.0.0-0fdb562ac8068ce3dda6b69aca3f355f4d1d2718。要求:项目:app > 无法解析 io.flutter:x86_debug:1.0.0-0fdb562ac8068ce3dda6b69aca3f355f4d1d2718。> 无法获取资源'https://storage.googleapis.com/download.flutter.io/io/flutter/x86_debug/1.0.0-0fdb562ac8068ce3dda6b69aca3f355f4d1d2718/x86_debug-1.0.0-0fdb562ac8068ce3dda6b69aca3f355f4d1d27'1。> 无法获取'https://storage.googleapis.com/download.flutter.io/io/flutter/x86_debug/1.0.0-0fdb562ac8068ce3dda6b69aca3f355f4d1d2718/x86_debug-1.0.0-0fdb562ac8068ce3dda6b69aca3f355f4d1d27'1。> PKIX 路径构建失败:sun.security.provider.certpath.SunCertPathBuilderException:无法找到请求目标的有效证书路径无法解析 io.flutter:x86_64_debug:1.0.0-0fdb562ac8068ce3dda6b69aca3f355f4d1d2718。要求:项目:app > 无法解析 io.flutter:x86_64_debug:1.0.0-0fdb562ac8068ce3dda6b69aca3f355f4d1d2718。> 无法获取资源'https://storage.googleapis.com/download.flutter.io/io/flutter/x86_64_debug/1.0.0-0fdb562ac8068ce3dda6b69aca3f355f4d1d2718/x86_64_debug-1.0.0-0fdb562ac8068ce3dda6b169aca3f3555555555 > 无法获取 'https://storage.googleapis.com/download.flutter.io/io/flutter/x86_64_debug/1.0.0-0fdb562ac8068ce3dda6b69aca3f355f4d1d2718/x86_64_debug-1.0.0-0fdb562ac8068ce3dda6b69aca3f355555555.f > PKIX 路径构建失败:sun.security.provider.certpath.SunCertPathBuilderException:
在此之前我遇到了代理错误,我通过在 .gradle 文件夹下添加一个 gradle.properties 文件来修复它,其中包含以下数据:
systemProp.http.proxyHost=proxy.company.com
systemProp.http.proxyPort=8080
systemProp.http.proxyUser=myId
systemProp.http.proxyPassword=myPass
systemProp.http.nonProxyHosts=localhost,127.0.0.1,0.0.0.0,.company.com
systemProp.https.proxyHost=proxy.company.com
systemProp.https.proxyPort=8080
systemProp.https.proxyUser=myId
systemProp.https.proxyPassword=myPass
systemProp.http.nonProxyHosts=localhost,127.0.0.1,0.0.0.0,.company.com
我确实有一个信任库文件,可用于其他需要它的项目,例如 Spring、JBoss、Tomcat 相关项目。
不确定这是否是所需的信任库文件
文件类型是 Java keyStore。
在项目内部,有一个 gradlew 文件。在其中我添加了以下内容以指向该信任库文件。
-Djavax.net.ssl.trustStore=truststore
这没有任何区别,最终会出现相同的错误。信任库文件的路径正确。因为为了测试,我添加了以下内容。
它确实会抛出一个不同的错误,指出未按预期找到文件。
-Djavax.net.ssl.trustStore=truststore12345
该数据似乎表明现在存在一些证书问题。我只在本地使用它。
或者,有没有办法通过这个安全检查?
请指教。谢谢你。
解决方案
推荐阅读
- python - 如何在 wagtail 站点地图上将协议更改为 https?
- service-worker - 在 Service Worker 中导入 Dexie
- delphi - 如何在不关闭非模态表单的情况下将值从非模态表单传递回主表单
- android - 与机读旅行证件交互时,一系列 Android 设备的反应不同
- apache-spark - Spark 类 org/apache/spark/sql/types/DataType 的 Snappy 数据缺失依赖项
- ballerina - 是否可以为 Ballerina 服务定义默认资源?
- html - 一类中的不同边框颜色 *CSS*
- networking - 卡车和订户干线之间的区别
- c# - 如何在html字符串之间创建链接
- java - 将 ArrayList 更改为 Array