tencent cloud

Feedback

SDK integration FAQs

Last updated: 2024-06-27 11:10:09

    When integrating the mini program SDK and compiling the project, you may encounter the following AAPT error

    AAPT: error: attribute android:requestLegacyExternalStorage not found.
    Solution
    Add the following configuration under the <application> tag in AndroidManifest.xml:
    <application
    android:theme="@style/AppTheme"
    tools:replace="android:icon"
    tools:remove="android:requestLegacyExternalStorage">
    /application>

    When integrating the mini program SDK and compiling the project, you may encounter the ‘Duplicate class android.support.v4’ error:

    Duplicate class android.support.v4.app.INotificationSideChannel found in modules core-1.3.1-runtime (androidx.core:core:1.3.1) and support-v4-21.0.3-runtime (com.android.support:support-v4:21.0.3)
    Solution
    Add the following code to `gradle.properties`:
    android.useAndroidX=true
    android.enableJetifier=true

    When integrating the mini program SDK and compiling the project, you may encounter the 'compileDebugJavaWithJavac' version matching error:

    Execution failed for task ':app:kaptGenerateStubsDebugKotlin'.
    > 'compileDebugJavaWithJavac' task (current target is 1.8) and 'kaptGenerateStubsDebugKotlin' task (current target is 17) jvm target compatibility should be set to the same Java version.
    Consider using JVM toolchain: https://kotl.in/gradle/jvm/toolchain
    Solution
    Change the JDK version in compileOptions in build.gradle to the appropriate version.
    android { compileOptions { sourceCompatibility JavaVersion.VERSION_17 //Need to match kapt version targetCompatibility JavaVersion.VERSION_17 //Need to match kapt version } }

    After accessing the mini program SDK, the following 'java.lang.NoClassDefFound, ProxyService' issue occurs when executing the project compilation build, as shown below

    
    Solution
    Check if the following configurations are present in the project and remove them if they are present.
    kapt.include.compile.classpath=false

    What is the minimum Android system version supported by the mini program SDK?

    Minimum SDK version (minSdkVersion): 21, corresponding to Android version Android 5.0.

    How to determine whether the mini program SDK has been initialised successfully?

    After version 1.5.1.1 of the mini program SDK mini_core, you can filter the logs through MINI_SHARK to determine whether the initialisation was successful or not, and a successful initialization will output: 'shark init ok!', as shown in the figure:
    
    If the initialisation of the mini program SDK fails, you will see the following exception log output:
    

    What types of devices does the mini program SDK support for debugging?

    The mini program SDK supports emulators and real devices with CPU architecture type arm. Emulators with x86 type are not supported.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support