Android 8.1 Compatibility Guidelines and Common Issues for Developers

Android 8.1 Compatibility Guidelines and Common Issues for Developers

Hot Articles | Click the title to read

Learn how to develop a practical complete Android App, source code included

Awesome! Complete source codes for 74 apps!

A 300,000 annual salary Android interview guide, with answers

Source: OPPO Developer Platform (ID:OPPOMOBILEOPEN)

According to Android Central, Google updated its article on the Android developer blog, introducing several new regulations that may have new impacts on the Android ecosystem. One of them: Starting from August 2018, all apps submitted to the Play Store must be developed for Android Oreo (Android 8.0/8.1, etc.).

For this latest system, Google emphasizes that Android Oreo has better security, and the 8.1 system adds features like picture-in-picture, desktop badges, and notification grouping. Additionally, Android 8.1 has also been specially optimized for battery life, with Google adding strong monitoring of background processes to enhance overall battery performance.

It sounds really great, but it also brings new challenges for developers. But don’t worry, we present the correct way to enjoy “Oreo”, hoping to help developers.

Android 8.1 Compatibility Guidelines

Compatibility Adaptation

Normal installation and uninstallation

Core application functions without freezing, crashing, unresponsiveness, or other exceptions

UI displays normally

Login accounts work normally (including third-party logins)

Lag and power consumption adaptation

Power Consumption:

Standby power consumption <= 8mA

Running scenario power consumption <= 400mA

Performance:

Application startup speed <= 1500ms

Resource loading speed <= 4000ms

FPS frame rate >= 25 frames and no more than 3 consecutive frames dropped

Common Issues and Solutions for Android 8.1

1

Third-party Protection

Problem Description: Due to changes in the art section of Android 8.1, many third-party protections have compatibility issues.

Quick Location: Known issues have obvious corresponding so error messages, and if you encounter exceptions like ClassNotFoundException, it is likely caused by unpacking exceptions.

Solution: Use the latest version of third-party protection applications, and be sure to update to the latest protection version.

2

Atlas Framework

Problem Description: Users of lower versions of the atlas framework have compatibility issues on Android 8.1, which can cause the application to crash 100% of the time.

Quick Location: libdexinterpret.so will report address exceptions.

Solution: The atlas developers have updated libdexinterpret.so for compatibility with Android 8.1, please update in time.

3

registerContentObserver Usage

Problem Description: After upgrading your version to 8.1 and above, if your registerContentObserver cannot specify the corresponding provider in the system, it will cause the program to crash.

Quick Location: This issue will print out a java.lang.SecurityException: Failed to find provider*** exception stack.

Solution: After upgrading your application version to Android 8.1 and above, ensure that your registerContentObserver points to a valid provider.

4

Notification Channel

Problem Description: With the new feature of Android O, developers must define a notification channel after upgrading the application to 8.1, otherwise your notification will not take effect.

Quick Location: You can find related logs indicating No Channel found for *** in the logs.

Solution: Carefully read Google’s official documentation and modify accordingly.

5

DexPathList Class

Problem Description: Some applications using reflection call internal interfaces like makePathElements in this class, which may cause exceptions in your program on Android 8.1.

Solution: Please modify your program and avoid using this method to call interfaces deprecated by Google.

6

Background Execution Limitations

Applications are restricted in two aspects:

Background Service Restrictions:

When in a background idle state, there are restrictions on background services that applications can use. Restrictions include stopping background services and applications not being able to create background services, etc.

Broadcast Restrictions:

Except for limited exceptions, applications cannot register broadcast receivers for implicit broadcasts in the AndroidManifest.xml manifest, but can register these broadcasts at runtime and can use explicit broadcasts specifically registered for them.

If you encounter other unresolved issues during the adaptation process for Android 8.1, feel free to leave a message for discussion.

If you have good articles to share, feel free to submit them, just send me the article link directly

Java and Android Architecture

Scan or click the QR code below to receive advanced resources for Android, Python, AI, Java, etc.

Follow and reply with “Baidu”, “Alibaba”, “Tencent”, “Resources” for surprises

Android 8.1 Compatibility Guidelines and Common Issues for Developers

Official Account:JANiubility

Welcome to join our Java and Android architecture circle, nearly 1000 people have joined for learning and communication, more learning resources will be updated, and more exchanges for progress

Android 8.1 Compatibility Guidelines and Common Issues for Developers

For more learning materials, click on the “Read the original text” below to obtain

Android 8.1 Compatibility Guidelines and Common Issues for Developers

Leave a Comment