Sunday, 15 November 2020

Error: Could not find EOCD, after adding "splits" in Android

I am getting this error when building APK file:

Execution failed for task ':app:packageHhiDebug'.
> A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable
   > Could not find EOCD in '....apk'

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

This issue occurs only when I use the following splits code in my gradle:

splits {
        abi {
            // Enable ABI split

        enable true

        // Clear list of ABIs
        reset()

        // Specify each architecture currently supported by the Video SDK
        include "armeabi-v7a", "arm64-v8a"//, "x86", "x86_64"

        // Specify that we do not want an additional universal SDK
        universalApk false
    }
}

I only wanted to exclude "x86" architectures, to reduce the APK size. How do I fix this?



from Error: Could not find EOCD, after adding "splits" in Android

No comments:

Post a Comment