Kotlin / multik

Multidimensional array library for Kotlin
https://kotlin.github.io/multik/
Apache License 2.0
632 stars 39 forks source link

AAB build not working #152

Closed guruprasannaR closed 1 year ago

guruprasannaR commented 1 year ago

When i use kotlinx:multik lib in my app , not able to generate a build .aab file. Bellow is the error when i build aab file:

Execution failed for task ':app:packageProdReleaseBundle'. A failure occurred while executing com.android.build.gradle.internal.tasks.PackageBundleTask$BundleToolWorkAction File 'root/lib/macosArm64/libmultik_jni-macosArm64.dylib' uses reserved file or directory name 'lib'.

NOTE : I'll test with both versions 0.2.1 and 0.2.0 it shows same error.

implementation "org.jetbrains.kotlinx:multik-core:0.2.0" implementation "org.jetbrains.kotlinx:multik-default:0.2.0"

devcrocod commented 1 year ago

multik uses the standard android bundle method. Android looks for native libraries in the lib/target_architecture_name folder.

In theory, this should not affect macosArm64 in any way, since it does not fall under this build structure.

Please provide more information so I can reproduce it. I'm interested in the version of gradle and android. If you send a reproducible case, it would be very helpful and make things easier.

guruprasannaR commented 1 year ago

Thanks for the response @devcrocod Gradle Version - com.android.tools.build:gradle:7.2.1 minSdkVersion - 19 targetSdkVersion - 31 Android Studio Version - Chipmunk 2021.2.1 Windows 10

guruprasannaR commented 1 year ago

Issue Reproduce Steps : 1.Created one New Project

  1. add dependencies
    • implementation "org.jetbrains.kotlinx:multik-core:0.2.0"
    • implementation "org.jetbrains.kotlinx:multik-default:0.2.0"
  2. Build a aab bundle from Build tab.
  3. Error Occurred Execution failed for task ':app:packageProdReleaseBundle'. A failure occurred while executing com.android.build.gradle.internal.tasks.PackageBundleTask$BundleToolWorkAction File 'root/lib/macosArm64/libmultik_jni-macosArm64.dylib' uses reserved file or directory name 'lib'.

NOTE : I'll attach test app. TestApp.zip

devcrocod commented 1 year ago

When building the bundle, tries to parse all arm native artifacts. Since macosArm is not for it, this error is obtained. Partially, this error can be solved by this solution: #148

Workaround:

guruprasannaR commented 1 year ago

Hey @devcrocod , Thanks build issue is resolved.