Object Box is unable to import dependencies in the new version of Android Gradle. There is no explanation for this version in the official documentation. I must use the old format in order to import dependencies according to the official documentation.
The following image shows the file structure of the new version of Gradle (8.1.1).
This is build.gradle of root project
This is settings.gradle of root project
This is Android Studio Version
The following image shows the file structure of the old version of Gradler (4.1.1),The structure of this version is the same as stated in the official document, so dependencies can be imported normally.
This is build.gradle(4.1.1) of root project
This is settings.gradle(4.1.1) of root project
You should be able to see the differences in the files from it. I have also tested importing dependencies in the old way in the new version, but sync may encounter errors, If anyone knows how to solve this problem, please feel free to contact me. Thank you.
I tried importing dependencies according to the official tutorial in the new version of Gradle (8.1), but it didn't work and there were errors when synchronizing the project. I have also tried to copy the format of the old version into a new project, which is a normal way to use it. I can also use the AGP Upgrade tool in Android Studio to update the Gradle to the latest version (8.1), but its format is still the old version. Currently, I have no way to correctly import the Object Box in the newly created Android project.
You should be able to see the differences in the image from it, If anyone knows how to solve this problem, please feel free to contact me. Thank you.