Using TFLite GPU in Android gives warning about duplicate namespaces
Hi @bvschaik, are you willing to contribute a PR? https://github.com/tensorflow/tensorflow/tree/master/tensorflow/lite/java are where the manifest files are. We will review your changes if you submit one. Hi @pkgoogle, Sure! I'm looking into it now. I see that there are 5 .aar files that are deployed to maven:

- tensorflow-lite
- tensorflow-lite-api
- tensorflow-lite-select-tf-ops
- tensorflow-lite-gpu
- tensorflow-lite-gpu-api

I'm only familiar with the play services version, which can contain either just `api` or both `api` and `gpu-api`.

Is it possible that a single app can contain any combination of above libraries? If so, I'll have to create 5 manifest files with 5 different namespaces. Hi @bvschaik, my intuition tells me it's possible, the review process will ferret that out though, IMO let's iterate faster here and just give it a try and let's see how the review goes. Thanks for your help! Alright, I have opened a PR: #61877 Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/61853">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/61853">No</a>
 Using a 2 year old version of AGP (which didn't issue a warning yet) is not a solution.
**Standalone code to reproduce the issue**
See: https://github.com/bvschaik/tflite-android-warning

Basically:

1. Create an empty Android project
2. Add tflite gpu dependency to build.gradle: `implementation("com.google.android.gms:play-services-tflite-gpu:16.2.0")`
3. Compile app: `./gradlew assembleDebug`
4. Note the warning emitted: 

> [org.tensorflow:tensorflow-lite-api:2.12.0] ~/.gradle/caches/transforms-3/2eb840e608fe786447e3ad08d13f4541/transformed/tensorflow-lite-api-2.12.0/AndroidManifest.xml Warning:
> Namespace 'org.tensorflow.lite' is used in multiple modules and/or libraries: org.tensorflow:tensorflow-lite-api:2.12.0, org.tensorflow:tensorflow-lite-gpu-api:2.12.0. Please ensure that all modules and libraries have a unique namespace. For more information, See https://developer.android.com/studio/build/configure-app-module#set-namespace

Cause:

Using tflite-gpu adds both the -api and -gpu-api libraries (output from `./gradlew :app:dependencies`):

```
\--- com.google.android.gms:play-services-tflite-gpu:16.2.0
     +--- com.google.android.gms:play-services-base:18.1.0 (*)
     +--- com.google.android.gms:play-services-basement:18.1.0 (*)
     +--- com.google.android.gms:play-services-tasks:18.0.2 (*)
     +--- org.tensorflow:tensorflow-lite-api:2.12.0
     \--- org.tensorflow:tensorflow-lite-gpu-api:2.12.0
```

Both org.tensorflow:tensorflow-lite-api and org.tensorflow:tensorflow-lite-gpu-api specify the same namespace (`org.tensorflow.lite`) in their mainfest:

```xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="org.tensorflow.lite">
...
```

Suggested solution:

Change the namespace in the manifest of org.tensorflow:tensorflow-lite-gpu-api to `org.tensorflow.lite.gpu` to make them unique.