The article directories
- preface
- Upgrade steps
- I have a problem
-
- Zhihu selection control crashes
- Aurora push is disabled on Android 10
- open failed: EACCES (Permission denied)
- Didn’t find class “org.apache.http.client.methods.HttpPost”
- Hongyang Recommended article
preface
If the project has not been adapted to AndroidX, please adapt to AndroidX first
For some changes to Android10, please check the official documentation
Upgrade steps
1. Change the TARGET_SDK_VERSION in gradle.properties to 29
Run the project on an Android 10 phone and actually test it
2. Then, according to some changes in the official documents, we searched for the places involved in the project
3, third-party library update, generally active projects have been adapted to Android10, we just need to update to the latest version
I have a problem
Zhihu selection control crashes
Generally active projects have already been adapted for Android10. For example, if the project uses Zhihu’s image picker Matisse, open the Github Matisse home page and click On Releases
As you can see, the crash issue on Android Q has been fixed in the latest version, so we can safely switch to the latest version and the issue will be resolved
Aurora push is disabled on Android 10
Aurora push was updated in February and March, the use of tag and alias were changed, so the SDK needs to be updated to modify the Aurora push in my project according to the official 3-minute demo
open failed: EACCES (Permission denied)
There is a picture clipping control in the project. After selecting the picture, an error is reported: Open failed: EACCES (Permission denied)
The solution is to add the application node in androidmanifest.xmlandroid:requestLegacyExternalStorage="true"
, i.e.,
Note that COMPILE_SDK_VERSION and BUILD_TOOLS_VERSION in gradle.properties should be set to version 29, otherwise the Manifest will tell you that this property cannot be found
Didn ‘t find the class “. Org, apache HTTP client. The methods. The HttpPost”
http:// at the beginning of site network request, an error Didn ‘t find the class “. Org, apache HTTP client. The methods. HttpPost “, the website of https:// is no problem
The solution is to add it in the manifest
android:usesCleartextTraffic="true"
<uses-library android:name="org.apache.http.legacy" android:required="false" />
Copy the code
As shown in figure
Hongyang Recommended article
Android 10 storage adaptation-that’s what our project is doing!