Android Integrating FAQs #

Here is a summary FAQs that may be encountered during your integrating process.

1、Attempt to invoke virtual method ‘void d.a.o.b.a.a(java.lang.String, java.lang.String, java.lang.String, java.lang.String)’ on a null object reference.

To avoid this problem, you need to add the following configuration in your ProGuard rules to exclude AIHelp:

-keep class net.aihelp.** {*;}

2、Too many field references: xxxxx; max is 65536.

There is a limit to the total number of references in the DEX bytecode file of Android build architecture. Please refer to the official document for solutions:

3、Default interface methods are only supported starting with Android N (–min-api 24)

To fix this problem, you need to add the following code in the android { ... } of your build.gradle :

android {
  compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8

4、This project uses AndroidX dependencies, but the ‘android.useAndroidX’ property is not enabled.

In order to provide better service to customers, AIHelp upgrades the SDK to AndroidX + API 29 from version 2.0.0.

Please refer to the official documentation to enable or migrate the project to Android X:

5、 Cleartext HTTP traffic to xxxxxx not permitted.

In order to promote the data security of network request, the system above Android 9.0 cannot use HTTP protocol by default.

You can add the following configuration to the application node in your AndroidManifest.xml to solve this problem: