App crash is also called "app crash", which means that the program exits abnormally and no longer runs; the reason why the app crashes is because the app's front-end program has a bug. Reasons for crashing: 1. Too many programs running on the phone, insufficient memory, causing the app to crash, or memory leaks, running out of memory for a long time and causing a crash; 2. The version of the application is too low, causing incompatibility and causing a crash. ; 3. The network is poor, or there is a network problem that prevents the app from responding.
The operating environment of this tutorial: HarmonyOS 2 system, HONOR V30 mobile phone.
App crash is also called "app crash". The program exits abnormally and no longer runs. In most cases, the app exits as soon as it is opened. In most cases, it is because the front-end program of the app has a bug, which causes the app to crash when it is running. This phenomenon is observed by users and exits as soon as it is opened, or it is simply called a crash.
The reason why the app crashed:
1. Network abnormality
No offline operation Switch between the three types of networks: no network, wifi, and mobile network with weak network. In the weak network scenario, the server does not respond in time
The program does not protect the network well, which will cause the app to crash
2. The app program does not have compatibility with the data returned by the interface
The data returned by the interface varies widely, including null, "", " ". If the app does not process it well, Will cause crash
3. Memory problem
There are too many programs running on the phone, and the app will crash if there is insufficient memory
Or the memory problem Leakage, running out of memory for a long time will lead to crash
4. The version is too low
The application version is too low, and the APP SDK is incompatible with the mobile phone system, resulting in Crashback Some APIs are available in the old version but not in the new version, causing the object to be empty and causing a crash
5. Permission issues
Usually it is in the AndroidManifest file Forgot to configure relevant permissions
6. Unreasonable design
1 interface, the amount of data pulled is too large, the request result will be very slow, and it takes up a lot of memory. APP will crash
7. Switching between different apps
Interactive testing may cause crash
8. Component issues
Where the APP accesses the network, the ImageView in the component is not downloaded normally and displayed on the app page
9. Crash after taking a picture/selecting a picture
Some mobile phones with small memory have horizontal and vertical screen switching when using the camera to take pictures, which may cause our application to readjust the life cycle. Solution: In the Activity settings that use the camera function: android:configChanges="orientation|keyboardHidden |screenSize"
10. Page layout problem
I forgot to specify orientation when using LinearLayout layout, and a crash occurred
Others
When using AS to develop Android programs, involving the real Android version, when generating the APK file, if V1 and V2 are not all checked, a crash may occur
Summary of reasons for app crash
For more related knowledge, please visit the FAQ column!
The above is the detailed content of What is app crash also called?. For more information, please follow other related articles on the PHP Chinese website!