我在华为P8智能手机上得到了"android P8: 502八月TLS OK“的例外,但它在三星Galaxy J3智能手机上运行良好。
import org.apache.commons.net.ftp.FTPSClient;
FTPSClient mFTPClient = new FTPSClient("TLS", false);
mFTPClient.connect(sFTPServer,iFTPPort) => exception android javax.net.ssl.SSLException: 502 AUTH TLS OK华为P8版

三星银河J3版

此命令适用于三星GALAXY J3智能手机,但不适用于华为P8智能手机:我如何解决它?
发布于 2020-01-17 16:55:14
根据这的安全规则,Android9(API 28+)中的安全规则已经发生了变化,因此您应该使用一种允许透明流量连接到服务器的方法。
一个简单的方法应该是添加:
android:usesCleartextTraffic="true"到你的<application>标签上
您也可以这样做:添加:
android:networkSecurityConfig="@xml/network_security_config"到应用程序清单中的<application>标记,然后创建XML文件"network_security_config.xml“:
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="true">
</network-security-config>https://stackoverflow.com/questions/59770934
复制相似问题