01/10/2025 10:53:00
Problem Description
Scenario 1: In Android 9.0 system, WeChat is not installed and login by scanning QR code fails. The error, "Cleartext traffic not permitted", is returned in the log, as shown in the following diagram.
Scenario 2: In Android 9.0 system, QQ is not installed. When QQ login is selected, the prompt "Login failed. Please try again. The error code is 9999" is shown in the following diagram. Normally, you should launch the QQ download page.
You can also see the following error in the callback log:
GetLoginError {"openid":"","token":"","token_expire_time":0,"first":0,"reg_channel_dis":"","user_name":"","gender":0,"birthdate":"","picture_url":"","pf":"","pfKey":"","need_name_auth":false,"channelID":0,"channel":"","channel_info":"","confirm_code":"","confirm_code_expire_time":0,"bind_list":"","methodNameID":112,"retCode":9999,"retMsg":"QQ login error occur","ret":-1,"msg":"onError msg = net::ERR_CLEARTEXT_NOT_PERMITTED","extraJson":""}
Cause of the Problem
The above error is because Android 9.0 system prohibits App from using any unencrypted links. If you use http to visit a website, you need to change the network security configuration.
Solution
To change the network security configuration, just add the following configuration under the "application" tag in the AndroidManifest.xml file.
android:usesCleartextTraffic="true"
All rights reserved.