When I try to build the project I get the following error:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':launcher'.
> Could not resolve all artifacts for configuration ':launcher:classpath'.
> Could not resolve com.android.tools.build:gradle:4.0.1.
Required by:
project :launcher
> Could not resolve com.android.tools.build:gradle:4.0.1.
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.0.1/gradle-4.0.1.pom'.
> Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.0.1/gradle-4.0.1.pom'.
> dl.google.com
> Could not resolve com.android.tools.build:gradle:4.0.1.
> Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/4.0.1/gradle-4.0.1.pom'.
> Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/4.0.1/gradle-4.0.1.pom'.
> jcenter.bintray.com
* 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 2s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
I am using Unity 2021.3.16f1
I have tried different ways to solve the problem. I even resorted to formatting the device, but without result
Related
I'm not able to build my unity project into apk, whenever i try to build it throw errors
I'm using unity 2020.3.21
I'm using api level 31 because i want to submit the update of my game on playstore and now they changed the api level to 31.
errors
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseAidl'.
> Installed Build Tools revision 33.0.0 is corrupted. Remove and install again using the SDK Manager.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with -
The other error
Could not determine the dependencies of task ':unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseAidl'.
> Installed Build Tools revision 33.0.0 is corrupted. Remove and install again using the SDK Manager.
* 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 17s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
]
As i can see in the error it is mentioned that Build Tools revision 33.0.0 is corrupted i already renistalled using the android studio but still the same error or maybe i did it wrong. if you know anything about this error then you are welcome any help should be appericiated.
try to install via unity package manager instead of android studio since it may have different file names for the different applications
hope this helps!
I have been deploying my C# MVC application for years now, as early as yesterday, successfully. Today however I started getting this error:
Step 6/6 : RUN npm install firebase-admin
---> Running in 6af72a3f9eaf
[91m/bin/sh: 1: npm: not found
The command '/bin/sh -c npm install firebase-admin' returned a non-zero code: 127
ERROR
ERROR: build step 0 "gcr.io/cloud-builders/docker" failed: step exited with non-zero status: 127
[0m
--------------------------------------------------------------------------------
ERROR: (gcloud.app.deploy) Cloud build failed. Check logs at https://console.cloud.google.com/cloud-build/builds/ea90f766-e252-4b9b-b707-746acf8ad686?project=186443889098 Failure status: UNKNOWN: Error Response: [2] Build failed; check build logs for details
Failed to deploy project [Project Name] to App Engine Flex.
The logs say this:
Step 6/6 : RUN npm install firebase-admin
---> Running in 6af72a3f9eaf
/bin/sh: 1: npm: not found
The command '/bin/sh -c npm install firebase-admin' returned a non-zero code: 127
ERROR
ERROR: build step 0 "gcr.io/cloud-builders/docker" failed: step exited with non-zero status: 127
Has anyone seen this error or know whats casing it?
The problem was the node.js version was wrong. It was trying to use the wrong node version when publishing vs what was defined in the code.
The program is executing properly without any error in Debug configuration But in Release configuration it throws an error.
The "ParseILMergeInfoTask" task failed unexpectedly.
System.Exception: File 'SharedAssemblyILMergeInfoFilePath' passed to argument 'x86\ret\SharedAssemblyILMergeInfo.csv' does not exist.
at Microsoft.Build.ILTasks.ParseILMergeInfoTask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
I can't run any program in Release configuration. It throws the same error.
Update
I think I found the problem but I don't know to resolve it. Previously I had an error Unable to load package 'Microsoft.Net.Native.SharedLibrary-x64'. To resolve it I follow it this answer. So I installed Microsoft.Net.Native.SharedLibrary-x64.1.6.1, Microsoft.Net.Native.SharedLibrary-x86.1.6.1 and Microsoft.Net.Native.SharedLibrary-arm.1.6.1 manually. Now If I open Microsoft.Net.Native.SharedLibrary-x64 package folder I can't find build and tools folder within it.
It is a problem due to the Internet connection.
Just delete the package
C:\Users\ponvi\.nuget\packages\microsoft.net.native.sharedlibrary-x64
Download the package using Mobile Data.
Another answer by rubStackOverflow
Really strange issue, in my case, I had to change my default network
DNS(network card) from 8.8.8.8 to 208.67.222.222.
I am new in the development in Android and i am having some problems in my learning. I am trying to build my solution in my cellphone, he is a Android of version 6.0. I fetched for some tutorials in the internet and even here in the Stack Overflow and because of it a downloaded all the versions of android sdk, since the 5.0 until the 7.1.1 and even the extra packages. Even so i continue receiving the same errors when i try to build my solution. They follow below:
FAILURE: Build failed with an exception.
Where: LuppApp
Build file 'C:\Oxaguia spk\Trabalhos\Coach IT\Visual Studio\LuppICS\SolutionLupp\LuppApp\platforms\android\build.gradle' line: 289
What went wrong: LuppApp 1
A problem occurred evaluating root project 'android'. LuppApp 1
Keystore file does not exist: c:\lupp-Release.keystore LuppApp 1
Try: LuppApp 1
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. LuppApp 1
Error: cmd: Command failed with exit code 1 Error output: LuppApp 1
FAILURE: Build failed with an exception. LuppApp 1
Where: LuppApp 1
Build file 'C:\Oxaguia spk\Trabalhos\Coach IT\Visual Studio\LuppICS\SolutionLupp\LuppApp\platforms\android\build.gradle' line: 289 LuppApp 1
What went wrong: LuppApp 1
A problem occurred evaluating root project 'android'. LuppApp 1
Keystore file does not exist: c:\lupp-Release.keystore LuppApp 1
Try: LuppApp 1
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. LuppApp 1
Picked up _JAVA_OPTIONS: -Xmx512M LuppApp 1
I will be really grateful for everyone who can help me. Thank you.
from the logs, what I see is that, you are trying to build app in release mode, Just check if you have the release-keystore file. Probably you can changed the built mode to debug since you are learning the app development.
I am trying to get the following Sonar C# plugin following the instructions here: http://docs.sonarqube.org/display/PLUG/C%23+Plugin
The C# plugin installed on the server is not compatible with the MSBuild.SonarQu
be.Runner.exe - either check the compatibility matrix or get the latest versions
for both.
Pre-processing failed. Exit code: 1"
when running step 6)a:
MSBuild.SonarQube.Runner.exe begin /k:"sonarqube_project_key"
/n:"sonarqube_project_name" /v:"sonarqube_project_version"
I have tried SonarQube versions 4.5.4 (LTS) and 5.1.1
Developer Command Prompt for VS2012
I installed java (oracle): jdk-8u51-windows-x64.exe
Microsoft (R) Build Engine version 4.0.30319.34209
Running on Windows server 2012
Any ideas on how to fix this?
thanks
From MrFox:
I've added a bounty to this question and am adding my questions on this issue here:
Do I need to make a SonarQube project or does "SonarQube_project_key" mean the visual studio project key I want SonarQube to scan.
Even though the term 'project' is used a lot I assume this relates to the open source definition of project. Not the visual studio definition that's part of a solution.
What exactly is the meaning of "sonarqube_project_version"? I've tried 6.5 (SonarQube version), 6.4.1 (SonarQubeC# plugin), 1.0.1 (MSBuild.SonarQube.Runner.exe version)
I've used the project key that's given as an example on the C# plugin website:
MSBuild.SonarQube.Runner.exe begin /k:"org.sonarqube:sonarqube-scanner-msbuild" /n:"Kadaster.Agris" /v:"1.0.1"
I've tried several permutations on these issues.
I would like to use the Analysis Bootstrapper for Visual Studio but can't find a download or explanation of how that could be done.
Edit: putting in the entire error message after request.
In text, this also include the command I'm using after the answers that have been given so far:
> D:\projects\agris\src>MSBuild.SonarQube.Runner.exe begin
> /k:"org.sonarqube:Kadas ter_Agris" /n:"Kadaster_Agris" /v:"0.1"
> Default properties file was found at
> D:\Software\MSBuild.SonarQube.Runner.1.0.1\ SonarQube.Analysis.xml
> Loading analysis properties from
> D:\Software\MSBuild.SonarQube.Runner.1.0.1\Sona rQube.Analysis.xml
> Pre-processing started. Preparing working directories... Checking for
> updates... The C# plugin installed on the SonarQube server is not
> compatible with the Sonar Qube analysis agent (i.e. the
> MSBuild.SonarQube.Runner.exe, or the build automat ion task). Either
> check the compatibility matrix or get the latest versions for both.
> Pre-processing failed. Exit code: 1
The first step is to do pre-processing:
> D:\projects\agris\src>D:\Software\sonar-scanner-msbuild-3.0.2.656\MSBuild.SonarQ
> ube.Runner.exe begin /k:"myCompanyHostedSonarQube:GMA_Kadaster_Agris"
> /n:"Kadas ter_Agris" /v:"0.1" SonarQube Scanner for MSBuild 3.0.2
> Default properties file was found at
> D:\Software\sonar-scanner-msbuild-3.0.2.656 \SonarQube.Analysis.xml
> Loading analysis properties from
> D:\Software\sonar-scanner-msbuild-3.0.2.656\Son arQube.Analysis.xml
> Pre-processing started. Preparing working directories... 09:08:16.861
> Updating build integration targets... 09:08:16.879 Fetching analysis
> configuration settings... 09:08:17.971 Generating rulesets...
> 09:08:17.993 Provisioning analyzer assemblies for cs... 09:08:17.994
> Installing required Roslyn analyzers... 09:08:18.507 Pre-processing
> succeeded.
Then the project must be rebuild.
Then tell SonarQube to end and send everything to the server, this last step fails:
> Done Building Project "D:\projects\agris\src\Kadaster.Agris.sln"
> (Rebuild targe t(s)).
>
>
> Build succeeded.
>
> "D:\projects\agris\src\Kadaster.Agris.sln" (Rebuild target) (1) ->
> "D:\projects\agris\src\Kadaster.Agris.Web\Kadaster.Agris.Web.csproj.metaproj"
> ( Rebuild target) (13) ->
> "D:\projects\agris\src\Kadaster.Agris.Web\Kadaster.Agris.Web.csproj"
> (Rebuild t arget) (14) -> (CoreCompile target) ->
> Controllers\OutputController.cs(48,30): warning CS0168: The variable
> 'ex' is declared but never used
> [D:\projects\agris\src\Kadaster.Agris.Web\Kadaster.Agri s.Web.csproj]
> Controllers\OutputController.cs(80,30): warning CS0168: The variable
> 'ex' is declared but never used
> [D:\projects\agris\src\Kadaster.Agris.Web\Kadaster.Agri s.Web.csproj]
> Controllers\OutputController.cs(166,30): warning CS0168: The variable
> 'ex' is declared but never used
> [D:\projects\agris\src\Kadaster.Agris.Web\Kadaster.Agr is.Web.csproj]
>
> 3 Warning(s)
> 0 Error(s)
>
> Time Elapsed 00:00:08.91
>
> D:\projects\agris\src>D:\Software\sonar-scanner-msbuild-3.0.2.656\MSBuild.SonarQ
> ube.Runner.exe end SonarQube Scanner for MSBuild 3.0.2 Default
> properties file was found at
> D:\Software\sonar-scanner-msbuild-3.0.2.656 \SonarQube.Analysis.xml
> Loading analysis properties from
> D:\Software\sonar-scanner-msbuild-3.0.2.656\Son arQube.Analysis.xml
> Post-processing started. The SonarQube MSBuild integration failed:
> SonarQube was unable to collect the re quired information about your
> projects. Possible causes:
> 1. The project has not been built - the project must be built in between the b egin and end steps
> 2. An unsupported version of MSBuild has been used to build the project. Curre ntly MSBuild 14.0 upwards are supported
> 3. The begin, build or end steps have not all been launched from the same fold er Generation of the sonar-properties file failed. Unable to
> complete SonarQube ana lysis. 14:38:26.197 Creating a summary
> markdown file... 14:38:26.2 Post-processing failed. Exit code: 1
The three warnings are about unused exception variables.
Do I need to make a SonarQube project or does "SonarQube_project_key" mean the visual studio project key I want SonarQube to scan.
The key specified by /k: will be used as the unique key to identify your project on SonarQube server.
It can be anything, and it's really up to you.
A common choice for example is the name of the solution in Visual Studio.
The /n: parameter defines the display name to use on SonarQube.
The /v: parameter defines the version of your project that your analysis represents.
One of the main purposes of SonarQube is to track the code quality changes in the so-called leak period,
which is the time since the last release.
The metrics of the leak period reset when the version changes.
SonarQube doesn't assume the version of your project,
you tell it yourself explicitly.
Even though the term 'project' is used a lot I assume this relates to the open source definition of project. Not the visual studio definition that's part of a solution.
The term 'project' in SonarQube documentation refers to the representation on SonarQube. In Visual Studio terms, it corresponds to the 'solution'. You typically create one SonarQube project per Visual Studio solution.
This is a matter of how you want to look at your quality metrics.
It usually makes sense to aggregate the metrics of all Visual Studio projects under one dashboard in SonarQube.
I would like to use the Analysis Bootstrapper for Visual Studio but can't find a download or explanation of how that could be done.
That's obsolete. You should not need that anymore, at the time of this writing.
It seems you're using a very old version of Scanner for MSBuild.
You can download the latest version from here,
try with this one:
https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+MSBuild
However, note that current versions of Scanner for MSBuild require MSBuild version 14 or higher.
That implies that your project needs to be built with Visual Studio 2015 or higher.
If your project uses an older version,
you will have to migrate it.