0

I want to integrate the tensorflow lite example in my project. What I already did:

  • Renaming app to lib_tensorFlow (you can not have 2 'app's)
  • Make the lib_tensorFlow Module to a library by changing to apply plugin: 'com.android.library'
  • deleting the applicationId
  • Importing the Project as Gradle Module
  • Adding implementation project(":lib_tensorFlow") to my apps dependencies
  • Searching for a offline mode in Gradle settings (There is no such option)
  • Invalidate Cache & restart
  • Googling

The Error I get when gradle builds the project:

Unable to resolve dependency for ':app@regularDebugAndroidTest/compileClasspath': Could not resolve project :lib_tensorFlow.
Show Details
Affected Modules: app

Unable to resolve dependency for ':app@regularDebugUnitTest/compileClasspath': Could not resolve project :lib_tensorFlow.
Show Details
Affected Modules: app

Unable to resolve dependency for ':app@regularDebug/compileClasspath': Could not resolve project :lib_tensorFlow.
Show Details
Affected Modules: app

Please don't mark this as duplicate. I have searched in every possible Thread. Any help would be appreciated!

  • The example already have 2 module build . have you created a new module ? or you are just using the same modules from example ? – ADM Jul 07 '21 at 12:44
  • Is the library included in your `settings.gradle` file? `include ':app', ':lib_tensorFlow'` – Alexander Hoffmann Jul 07 '21 at 12:52
  • 1- I am using the same modules as in the example 2- Yes it is included – balalopilav Jul 07 '21 at 12:58
  • if u r using same module i do not see a module named `lib_tensorFlow` in the example . There r two modules named `lib_support` and `lib_task_api`. [here](https://github.com/tensorflow/examples/blob/master/lite/examples/image_classification/android/app/build.gradle). – ADM Jul 07 '21 at 13:07
  • I renamed it to lib_tensorflow because you can't have two modules with the name "app" as said above – balalopilav Jul 07 '21 at 13:10
  • this might be a similar issue to this: https://stackoverflow.com/questions/46949622/android-studio-3-0-unable-to-resolve-dependency-for-appdexoptions-compileclas or maybe the solutions there would just help too – Osman Jul 07 '21 at 15:43

0 Answers0