# ND4J is conflicting with Android dependencies

**URL:** <https://community.konduit.ai/t/nd4j-is-conflicting-with-android-dependencies/2870>\
**Category:** ND4J\
**Created:** [October 26, 2023, 8:35am UTC](https://community.konduit.ai/t/nd4j-is-conflicting-with-android-dependencies/2870 "2023-10-26T08:35:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![TinTran64](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/tintran64/32/1222_2.png) [@TinTran64](https://community.konduit.ai/u/TinTran64)\
**Post date:** [October 26, 2023, 8:35am UTC](https://community.konduit.ai/t/nd4j-is-conflicting-with-android-dependencies/2870/1 "2023-10-26T08:35:18Z")

</div>

ND4J’s guava and protobuf are conflicted with other Android dependencies that we are using. If we exclude one the other would stop working. Is there a way to resolve that?

I think this is because `javax.annotation` in `org.nd4j:guava` and `com.google.thirdparty.publicsuffix` in `org.nd4j:protobuf` is not shaded causing the conflict

 ![Screenshot 2023-10-26 at 16.57.11](https://canada1.discourse-cdn.com/flex035/uploads/konduit/original/2X/1/15f9f993fe22212f839082ebe3100dd80db600b6.png)

---

<div class="post-metadata">

**Author:** ![agibsonccc](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/agibsonccc/32/697_2.png) [@agibsonccc](https://community.konduit.ai/u/agibsonccc)\
**Post date:** [October 28, 2023, 2:09am UTC](https://community.konduit.ai/t/nd4j-is-conflicting-with-android-dependencies/2870/2 "2023-10-28T02:09:06Z")

</div>

@TinTran64 I saw your issue. I’ll get this fixed next week. This should be fairly easy.

---

<div class="post-metadata">

**Author:** ![TinTran64](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/tintran64/32/1222_2.png) [@TinTran64](https://community.konduit.ai/u/TinTran64)\
**Post date:** [December 4, 2023, 8:13am UTC](https://community.konduit.ai/t/nd4j-is-conflicting-with-android-dependencies/2870/3 "2023-12-04T08:13:17Z")

</div>

@agibsonccc Any update on this? Do I have to build ND4J from source to get this fixed?

Another issue on Android is nd4j makes the app can’t be bundled into an aab due to `openblas` jar having `lib` folder and android bundle tool doesn’t like it

> A failure occurred while executing com.android.build.gradle.internal.tasks.PackageBundleTask$BundleToolWorkAction  
> File ‘root/lib/arm64-v8a/include/cblas.h’ uses reserved file or directory name ‘lib’.

---

<div class="post-metadata">

**Author:** ![agibsonccc](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/agibsonccc/32/697_2.png) [@agibsonccc](https://community.konduit.ai/u/agibsonccc)\
**Post date:** [December 9, 2023, 10:52am UTC](https://community.konduit.ai/t/nd4j-is-conflicting-with-android-dependencies/2870/4 "2023-12-09T10:52:48Z")

</div>

@TinTran64 yeah no matter what you would probably need nd4j-minimal as your backend. That’s a new backend that just uses nd4j-native but strips openblas.
