SOLVED Unity: Installed Build Tools revision 32.0.0 is corrupted. Remove and install again using the SDK Manager - unity3d

Assalamu'alaikum wr wb
Unity version 2020.3.17f1 LTS
Using Photon Fusion
Using PlayFab
I have find this error
How to solve is:
Edit>Project Settings>Player>Publish Setting> Tick Custom Main Gradle Template
Edit>Project Settings>Player>Publish Setting> Tick Custom Launcher Gradle Template
Open Assets>Plugins>Android>mainTemplate.gradle
Open Assets>Plugins>Android>launcherTemplate.gradle
Then both of them change:
buildToolsVersion BUILDTOOLS
to
buildToolsVersion '30.0.3'
Then test build for android Apk or aab
Note: if you find error configuration ':launcher:lintClassPath' then before you build to android please tick Development Build in Build Settings
Wassalamu'alaikum

Related

Flutter application not working due to Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8

I am trying to make a flutter application but I constantly get this error :
* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin 'com.android.internal.application'.
> Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
You can try some of the following options:
- changing the IDE settings.
- changing the JAVA_HOME environment variable.
- changing `org.gradle.java.home` in `gradle.properties`
I followed this question : Android Studio Error "Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8"
and this was the output :
------------------------------------------------------------
Gradle 7.4
------------------------------------------------------------
Build time: 2022-02-08 09:58:38 UTC
Revision: f0d9291c04b90b59445041eaa75b2ee744162586
Kotlin: 1.5.31
Groovy: 3.0.9
Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM: 13.0.7 (Private Build 13.0.7+5-Ubuntu-0ubuntu120.04)
OS: Linux 5.4.0-125-generic amd64
JVM points to 13.0.7. What can be issue and how can it be resolved? Thankyou
In your Android Studio IDE, go to ~
Preferences → Build, Execution, Deployment → Build Tools → Gradle → *Gradle JDK
and choose the appropriate JDK version and apply. Try to take the embedded JDK as that would be IDE version appropriate. After this sync project and run.
Check your version of Android Studio and update to Dolphin (2021.3.x).
There are plenty of answers to this question out there that simply ask you to point to the right SDK. None of them appreciate that in some 4.x versions of Android Studio, you can be pointing to the right SDK, but Android Studio keeps pointing to the v1.8, even if you have a version >11 installed and selected in:
Project Structure, or
Preferences
It's possible that: C:*\java -version --> Results in jre/jvm >11, your 'flutter doctor -v' still says: jre/jvm-1.8.
If you don't see the above screen posted by GeekyChick in settings (i.e., "it's a location that only opens up a checkbox where its written generate *.iml files"), than you probably have Android Studio v4.x, rather than a 2021.x or greater.
Upgrade your Android Studio to Dolphin, and re-follow the instructions to choose the right SDK in Project Structure (not Settings).

No toolchains found in the NDK toolchains folder for ABI with prefix: arm-linux-androideabi

I was working on a Flutter project and everything was working fine until I updated My Android Studio and some of the SDK tools. Then when I was trying to run my project, I was getting the Error below:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:stripDebugDebugSymbols'.
> No toolchains found in the NDK toolchains folder for ABI with prefix: arm-linux-androideabi
* 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](https://help.gradle.org)
BUILD FAILED in 1m 4s
Exception: Gradle task assembleDebug failed with exit code 1
So what have gone wrong? What should I do?
The main reason is that NDK 23 has different toolchain than the previous versions of NDK (22-), so the old version of AGP (Android Gradle Plugin) has not idea where to find the executables for different ABIs.
For me, simply update the AGP version in the build.gradle in your Android project root to 4.0+, such as
dependencies {
classpath "com.android.tools.build:gradle:4.0.1"
...
This will resolve the problem.
Note: You will need to set the environment variable ANDROID_NDK_HOME to your NDK 22- location, even Google's document does not require that or says it is deprecated.
If you want to stick to the current version of AGP, there is another work around, simply add this
android {
android.ndkVersion "21.4.7075529" // (or whichever NDK 22- version you have installed)
...
to your module's build.gradle (not the build.gradle of your project)
Some other ways to work around this can be found here, Configure the NDK for the Android Gradle plugin
Well I solved the issue in 2 different ways:
A. I downgraded my NDK from version 23.0.7123448 to 22.0.7026061 by simple steps below:
1.Open SDK Manager from tool bar of android studio or from settings menu (File --> Settings --> Appearance and Behavior --> System Settings --> Android SDK).
Select the SDK Tools tab and from the Bottom Right of the window check the Show package details. Then simply uncheck any version you want to delete and select Apply.
(For me removing version 23.0.7123448 and get to 22.0.7026061 solved the problem. But if you are still having the Error above try to lower the NDK version. The most stable NDK version is 20.1.5948944)
If you have done all the steps before, you will see the following window popping up. Hit OK and you are all set.
B. This approach might look simple but yet it does the trick. Simply create a new Flutter project and get all you work (lib folder, assets, etc) to the new project.
Environment
OS : Big Sur 11.1
npm 7.24.0
node v14.15.5
react-native-cli: 2.0.1
react-native: 0.63.4
Command
react-native run-android
Error
*What went wrong:
Execution failed for task ':app:stripDebugDebugSymbols'.
No toolchains found in the NDK toolchains folder for ABI with prefix: arm-linux-androideabi
Fix
Checking Android SDK Tools, NDK (side-by-side):
In the android toolbar go to:
Tools >> SDK Manager
![Tools-SDK][1]
Then in the popup aside navigation go to:
Appearance & Behavior >> System Settings >> Android SDK

Click “SDK Tools”
Check the box next to show package details

Solution:
Downgrade
References
Idea for downgrade: Taba's solution
Here's what worked for me
I updated AGP to 4.1+ in my Android Project root build.gradle
dependencies {
classpath "com.android.tools.build:gradle:4.1.0"
...
AGP 4.1+ supports only gradle version gradle-6.5 above
so I updated the distributionUrl in gradle-wrapper.properties file located in gradle/wrapper folder
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
Get more info here
what worked for me was
I change my Gradle dependencies from 3.5.1 to 4.0.1
dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
}
which is under build.gradle
The minimum Gradle support for Gradle dependencies(gradle:4.0.1) is gradle-6.1.1
if your gradle version for the project is below that you will have to change it by downloading a higher version or if you have it and you're using a wrapper, you will have to change the distribution to the one higher or same as the 6.1.1 version.
which is under >gradle >wrapple >gradle-wrapple.properties
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
You might most likely need to add to your NDK
for Gradle-6.7 the supported NDK is NDK(side by side) version 21.0.6113669
which is under >tools >sdk manager(android SDK) >sdk tools >ndk side by side
click show package details click and download the appropriate one for you
I clean all SDK folders in c:\Users\User\AppData\Local\Android\Sdk\ndk\
Recent AppCenter android dependencies changes caused my android builds to fail with this error:
No toolchains found in the NDK toolchains folder for ABI with prefix: arm-linux-androideabi
Our solution was to upgrade the gradle version from 3.5.4 to 4.0.1 in the root build.gradle file:
dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
Additional answer for #gwang and #TillyJonesy:
When running Gradle command with --info(AGP 3.5.4 for me), you will see that when no NDK version was given, AGP will try to use the highest NDK version.
And from the docs of Android NDK guidance, AGP <= 3.5 has no default NDK version.
See: https://developer.android.com/studio/projects/install-ndk#default-ndk-per-agp
Solution for native android developers
Go to File->Settings->Appearance & Behaviour->System Settings->Android SDK-> then select SDK Tools and check 'Show Package Details' from bottom.
in Dropdown of NDK(Side by Side) ,check 22.1.7171670 and uncheck remaining then apply and click ok.

multiple versions of gradle plugin when building in unity

I am using the skillz sdk to develop a quiz game which requires gradle. My current version of unity is 2019.3.0.a5. When I build the project I get the following errors.
> Failed to apply plugin [id 'com.android.library']
> Using multiple versions of the Android Gradle plugin in the same build is
not allowed.
'C:\Users\Zachary Edgell\cash quiz\Temp\gradleOut\launcher' is using
version 3.2.0
'C:\Users\Zachary Edgell\cash quiz\Temp\gradleOut\unityLibrary' is
using version 3.2.1
I have attempted to down grade to unity 2019.1.8f1when I try to build again I get the error
FileNotFoundException: Temp\gradleOut\build\outputs\apk\release\gradleOut-release.apk does not exist
When I try to do a development build on 2019.1.8f1 I get the following error
FileNotFoundException:Temp\gradleOut\build\outputs\apk\release\gradleOut-debug.apk does not exist
I have also attempted to delete the temp folder and rebuild but I get the same error.
The problem was solved by downgrading to unity 2018.4.3f1 if any one is having this issue just back up your files then try to downgrade to unity 2018.4.3f1

Unable to figure out,No Build tools found

Error:No installed build tools found. Install the Android build tools version 19.1.0 or higher.
Every time i used to gradle sync the project from android studio,I got above error.
Try to change your gradle version in /projectName/build.gradle
classpath 'com.android.tools.build:gradle:x;xxxx'
Then download the new version of the build tools 19.1 and change the following line in /projectName/moduleName/build.gradle
android {
compileSdkVersion 19
buildToolsVersion "19.1" //Set this to 19.1 after SDK update
...
}
Sync your gradle files and it should be working now.

Error android:layout_marginEnd with appcompat v7 library

I got this error:
removing attribute http://schemas.android.com/apk/res/android:layout_marginEnd from <ImageView>
from the abc_activity_chooser_view.xml XML file when compiling the appcompat v7 library in my Android project.
Things I have tried:
Uninstall Eclipse Luna and Android SDK completely.
Re-install Eclipse Luna and Android SDK.
Install the require Android components via Android SDK Manager.
In Eclipse, ask Android Lint to ignore the error in Preferences and Skip Library Project Dependencies.
Clean and build all projects.
Add -clean directive to eclipse.ini file.
But without any success.
Tools I used are:
OS: Window 7 64-bit
IDE: Eclipse Luna Service Release 2 (v4.4.2) Build 20150219-0600
64-bit
Android SDK: Android v5.1.1 (API Level 22)
ADT: v23.0.6.1720515
Android SDK Tools: v24.1.2
Android SDK Platform Tools: v22
Android SDK Build Tools: v22.0.1
Android Support Repository: v12
Android Support Library: v22
Does anyone have any suggestion on how to fix, or workaround this error till Google fix this error?
I can't deploy my Android package until this error is fixed.
Thanks for any help.
To fix the android:layout_marginEnd error, within Eclipse, open the project.properties file within the appcompat v7 library and add the following directives:
target=android-21
sdk.buildtools=21.1.2
Note: You may need to install the Android SDK Build Tools v21.1.2 [if you haven't already] via the Android SDK Manager.
For those wishing to support Android 5.1+ (API 22) in your Android apps, you can add the following directives to the project.properties file of each of your Android project:
target=android-22
sdk.buildtools=22.0.1
Note: You may need to install the Android SDK Build Tools v22.0.1 [if you haven't already] via the Android SDK Manager.
So, in essence, you're using one version of the Android SDK Build Tools to build your Android apps, and another to fix the android:layout_marginEnd error in the appcompat v7 library.
The documentation for the sdk.buildtools directive is here. The documentation also include info on how to setup the buildToolsVersion directive in the build.gradle file for those using Android Studio and Gradle.