Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AAB build not working #152

Closed
guruprasannaR opened this issue Dec 19, 2022 · 5 comments
Closed

AAB build not working #152

guruprasannaR opened this issue Dec 19, 2022 · 5 comments

Comments

@guruprasannaR
Copy link

guruprasannaR commented Dec 19, 2022

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
Copy link
Collaborator

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
Copy link
Author

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
Copy link
Author

guruprasannaR commented Dec 19, 2022

Issue Reproduce Steps :
1.Created one New Project
2. add dependencies
- implementation "org.jetbrains.kotlinx:multik-core:0.2.0"
- implementation "org.jetbrains.kotlinx:multik-default:0.2.0"
3. Build a aab bundle from Build tab.
4. 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
Copy link
Collaborator

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:

  • use the Kotlin artifact without native dependencies. To do this, instead of default specify org.jetbrains.kotlinx:multik-kotlin:0.2.1. Artifact kotlin has worse performance, but no build issues
  • If performance is important to you, then from jar multik-openblas-jvm remove all files from lib package except arm-v8

@guruprasannaR
Copy link
Author

Hey @devcrocod , Thanks build issue is resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants