Unity reports an error when running the android studio project package

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
Open Cmd and enter the packaged project, as follows. Insert image description here
Enter gradlew --warning-mode all
Insert image description here
. It means that the RepositoryHandler.jcenter() method in Build.gradle(project) has been Deprecated
and changed to mavenCentral()
Insert image description here

"----------------------------Dividing line------------------- ----------" Then I still can't pack it out

Secondly, you can enter gradlew processDebugManifest --stacktracethis command and you will know that this is printing the tracking information of the processDebugManifest execution process, so when other errors occur in the build, as long as you find the program that throws the error, and then replace processDebugManifest, you can also get the corresponding tracking information. For
example What I Insert image description here
mean by this sentence is that my path does not have AndroidManifest Insert image description here
. This problem is relatively rare. I worked on it for a long time and could not find the reason. Later, I was about to collapse and came up with a method. I created a new empty project. Then which empty project will create a manifest in unityLibrary, and then I copy the manifest of the new project, and it's ok! (PS: It didn’t work once during my period. It said my key was wrong, so I closed the key and repackaged it.)

"----------------------------Dividing line------------------- ----------》

Secondly, check if the version is correct

"----------------------------Dividing line------------------- ----------》

Use this command line to print out more log information

gradlew compileDebug --stacktrace

Insert image description here
The result is that he doesn’t know, so he asked me to check it in more detail. I can only look at the specific error you reported, and then you can check the specific reason.

Guess you like

Origin blog.csdn.net/qq_42489774/article/details/128442586