How do you downgrade Android Studio build-tools? - android-studio

I'm trying to downgrade my version of Android Studio's build-tools from 33 to 32 because NativeScript isn't compatible with 33, but I don't know how. Can anyone help?

Modify the project build.gradle file,compileSdkVersion from 33 to 32,buildToolsVersion from "33.0.0" to "32.0.0",targetSdkVersion from 33 to 32

SDK Manager > SDK Tools > Check "Show Package Details" in bottom right > Uncheck the newer versions you want uninstalled

Related

Unknown attribute warning in XML

AndroidManifest and XML layouts are showing me the Unknown attribute android: warning even though the attributes exist and the app works on the device.
Example: Unknown attribute android:maxSdkVersion, android:clickable="true" etc.
I am aware of the other questions regarding this issue and tried everything I could find about this topic but nothing works for me.
I tried to:
Sync Project with Gradle Files
Delete the .idea and .gradle folders from the project location
Delete caches from c:\Users\<user>\.gradle\caches\
Invalidate caches and restart ...and many other things I couldn't remember right now.
The problem still persists on a newly installed OS (Windows 11) and obviously, newly installed Android Studio, and also the issue affects only old projects...
Also, my project is up to date with everything the Android Studio doesn't show me any warning to update a version of a dependency or so.
Gradle version 7.3.3
Android Gradle Plugin Version 7.2.1
Update:
The warning appears only with the SDK version 33 (compileSdkVersion 33), if I build with version 32, the warning disappears...
Update2:
New projects which use API level 33 still show the warning...
Maybe it's a bug in the SDK?
UPD 20.01.2023: You can update Android Studio to the latest version now (Android Studio Electric Eel | 2022.1.1) and this bug is fixed there. Worked for me.
OLD: Got same crap and a lot of other.
And yes, just downgraded buildToolsVersion to "32.1.0 rc1" and targetSdkVersion, compileSdkVersion to API 32 for as long as bug exists in API 33.
Same here, I use this temporary workaround until Android team fix this issue or better solution.
Move all require code for Android 13 into library module (in my case, all of them are moved into utility module) and keep it use compile SDK 33
Temporary changes compile SDK in other module to 32 for local development
It's not ideal, but switching to Dolphin RC1 resolves this. Given that it will (presumably) hit stable pretty soon, it may not get fixed in Chipmunk. You can download Dolphin from the Android Studio Preview page, just be aware that it is not available as an installer so you will need to manually update your installed version or use it alongside until it hits stable.
Perfect!!
set compileSdkVersion to 32
compileSdkVersion 32
set targetSdkVersion to 32
targetSdkVersion 32
downgrade androidx.core:core-ktx
implementation 'androidx.core:core-ktx:1.8.0'
This config works for me:
Android Studio Dolphin | 2021.3.1
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
compileSdk 33 (SDK 33 Rev. 2, Sources 33 Rev. 1)
buildToolsVersion "33.0.0"
targetSdkVersion 33
Gradle Plugin version 7.3.0.

The specified Android SDK Build Tools version (28.0.3) is ignored

what can i do in this situation? In Android Studio 4, I'm seeing this issue: The specified Android SDK Build Tools version (28.0.3) is ignored, as it is below the minimum supported version (29.0.2) for Android Gradle Plugin 4.0.0. Android SDK Build Tools 26.0.2 will be used.
Change your buildToolsVersion to '29.0.2' in build.gradle file.
As on version Android 4.1.2 it says remove buildToolsVersion "28.0.2" from your build.gradle file since it has its own default build tools now and just Sync it. It worked for me.

Gradle Sync Failed in Android Studio 3.6 Cause invalid type code :85

I just update my Android Studio from version 3.5.3 to 3.6, now I open any project I see this error and gradle doesn't sync
I was having the same issue. I solved it by changing the JDK version I was using which was JDK 13.
Go to File -> Project Structure.
On the left side, click on SDK Location and go to JDK Location.
Change it to the Embedded JDK that comes with Android Studio.
Click on OK.
I found out that some people might use Android 4.0 with Java 14 and Gradle 6.1.1 like me. And they are not supported for each other, so just update Gradle to 6.5.1; it will solve the problem. To update Gradle, click in the Android Studio tab: File -> Project Structure -> Project. Then, change the Gradle version to 6.5.1.
Thanks, it was very helpfull!
Here's what I did to solve the issue with JDK 11 + Android 4.0.
Follow Tran's answer (https://stackoverflow.com/a/62967378/5359328) and upgrade to Gradle 6.5.1.
Build project. It still shows the same error.
Change JDK to 8 in Project Structure, build. It's successful.
Change JDK back to 11 in Project Structure, build. It's successful again.

This version of Android Studio cannot open this project, please retry with Android Studio 3.5 or newer

This version of Android Studio cannot open this project, please retry with Android Studio 3.5 or newer.
but my android studio version is 3.3.1 and there is no new update from Google
Change Project level gradle as below -
classpath 'com.android.tools.build:gradle:3.3.1'
Change gradle-wrapper.properties as below -
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
Hope this will work...
Just Change the classpath to the version of your Android Studio Version.
To Find Version :
Click on help > About > Version is visible.
It will download the Gradle according to your android studio version.
Eg :
If your android studio version is 3.3.2 then change as follow :
classpath 'com.android.tools.build:gradle:3.3.2'
You would need to lower your gradle version in your project build.gradle file.
Hope it helps...

How do I install BuildTools 17 and Up in Android Studio?

Android Studio only gives me an option to install Android SDK Build-Tools 26, how do I install for BuildTools 17
In SDK Manager, go to SDK Tools tab, click on Show Package Details on the bottom of SDK Manager window. Scroll down and check the versions you want to download.

Resources