I did download the classroom ungraded lab code from GitHub tensorflow-2-public/C2_Device-based-TF-lite/W2/ungraded_labs/android_apps at main · https-deeplearning-ai/tensorflow-2-public · GitHub , but considering current implementation, the Gradle needs a lot of update, so I decide to rewrite the project in a new file, I tried to implement the UI, which works, then I tried to implement the backend solution which involves the dependencies to import the interpreter model & the dependencies to exclude the model tflite from being compressed, I found out aaptOptions is deprecated & implementation ‘org.tensoflow: tensorflow-lite:0.0.0-nightly’ does not work with lastest version of Android Studio, so I use the more recent ones but unfortunately it does not work with my code. Please I need some suggestions as to how to approach this & run the model on my android app
@Jamal022
Is this notebook from Tf data and deployment specialisation?? Then kindly move your post from ai project to the appropriate specialisation, so respective mentors can respond to you.
It’s beyond the scope of the notebook, since I’m rewriting a project, according to recent standard, of course I was asked to move it here for the reason of rewritten the project
Ok no problem, tagging a tf d & d mentor @Jamal022
Please have a look at this post @Jamal022 I feel this is a compatibility issue with the version use of tensorflow but as I was not sure, I have directed towards you and L.T of TF D & D specialisation course Chris favila.
@chris.favila can you also have a look at this once pleas, in case there is no response from the mentor or you have solution to his issue.
Regards
DP
Thanks, for the reply, I look forward to the mentor support
Thanks @Deepti_Prasad for the mention.
Hey @Adaramola_Samson,
Is your problem related to updating the Gradle configuration and dependencies?
Yes, it is, I guess their is a compatibility issues with the implementation ‘org.tensorflow: tensorflow-lite.nightly’ with the recent android studio
Hey @Adaramola_Samson,
Okay let’s try to address your problem in steps:
-
Check for Updates: Ensure that both Android Studio and the TensorFlow Lite dependency are updated to their latest versions. Sometimes, compatibility issues are resolved in newer versions.
-
Check Dependencies: Review the dependencies in your
build.gradle
file to ensure they are compatible with each other. -
Use Gradle Sync: Perform a Gradle sync in Android Studio to ensure that all dependencies are correctly downloaded and configured.
Try these things and let me know if your problem hasn’t been solved.
Best,
Jamal
Yes, I did implement the update necessary, but I guess it’s not compatible with the models available.
I updated implementation ‘org.tensorflow:tensorflow-lite:0.0.0-nightly’ to implementation (“org.tensorflow:tensorflow-lite:1.12.0”)
Then
aaptOption {
noCompress “tflife”
} To
androidResources {
noCompress += “tflite”
}
This is no complie Time error but runTime error, then the app crashes on launch time
Hey @Adaramola_Samson,
If it’s not compatible, consider checking the dependencies used within the project. You might need to downgrade instead of upgrading to make it compatible with the model.
Yes, this was my first option, but gradle.build seems phase out in the new development environment, aaptOption is already deprecated & targetSdk is 28, while the lowest device I have is 29, in summary, most line of dependency in the Gradle.build(app) has lot of issues with the current development area.
So I had to write a new project, which I eventually which I had compatibility issues with, I don’t know if I could get a Tensorflow-lite model on hub which could help solve this compatibility issues