Error Building Gradle Android Persistent, Build Error Insistent android apk

I am a newbie here on unity and recently I finished creating my first android game, but I have a problem when I go to build the game in apk makes me the error (Gradle build failed) followed by two other errors that I will put in the photos, hi tried to do everything i followed other forums reprinting the jdk,ndk,sdk, and the Gradle but nothing, I tried to move the paths but nothing I tried to set the system java variables but nothing, in short I tried all the solutions possible but nothing, The mistake always comes back. Can someone really good give me a hand?? thank you very much!! buld eror

error in log

° the problem is as follows, practically when I go to generate the APK for my game after a few uploads and processes gives me the error "Gradle build failed" and does not make me finish the apk export, I tried to follow several forums and videos on youtube that said to uninstall and reprint the latest version of the gradle or jdk and ndk but I did not get any feedback,or edit the file gradleTemplate.properties putting on top of it these two lines android.useAndroidX=true, android.enableJetifier=true. but nothing to do no result,I tried to export it and open it in android studio trying to rebuild the scale but ninte and other options yet, I would like to know if there are still some resolution options they could do and other problem solving strategies, remember that I have the version of unity 2022.2.16f1. I put below messages in the unity log.

° Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8

FAILURE: Build failed with an exception.

* Where:
Build file 'E:\KubeM V.1.0\KubeM V.1.0\Library\Bee\Android\Prj\IL2CPP\Gradle\build.gradle' line: 8

* What went wrong:
Could not compile build file 'E:\KubeM V.1.0\KubeM V.1.0\Library\Bee\Android\Prj\IL2CPP\Gradle\build.gradle'.
> startup failed:
  build file 'E:\KubeM V.1.0\KubeM V.1.0\Library\Bee\Android\Prj\IL2CPP\Gradle\build.gradle': 8: only id(String) method calls allowed in plugins {} script block
  
  See https://docs.gradle.org/6.9.1/userguide/plugins.html#sec:plugins_block for information on the plugins {} block
  
   @ line 8, column 5.
         classpath 'com.android.tools.build:grandle:4.0.1'
         ^
  
  1 error


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 4s

UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

° CommandInvokationFailure: Gradle build failed. 
C:\Program Files\Unity\Hub\Editor\2022.2.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath "C:\Grandle\gradle-6.9.1-all\gradle-6.9.1\lib\gradle-launcher-6.9.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"


° Build completed with a result of 'Failed' in 246 seconds (246486 ms)
3 errors
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&

thanks a lot guys!!

I tried to build the project and after a while I got this error and did not generate the apk



Comments

Popular posts from this blog

Today Walkin 14th-Sept

Spring Elasticsearch Operations

Hibernate Search - Elasticsearch with JSON manipulation