Upgrading Android App results in org.gradle.api.artifacts.result.ResolvedComponentResult.getVariant()… error message

Recently I uploaded an app to the Google Playstore and it told me that before the next version could be uploaded I needed to target a later OS version, and that certain of the files I was using were old/deprecated and told me to change the dependencies.

So, in build.grade I altered the relevant sections to read:

compileSdkVersion 34
targetSdkVersion 34

and

implementation 'androidx.fragment:fragment:1.7.0'
implementation 'com.google.android.gms:play-services-maps:18.0.0'

When I try to build this I get:

Unable to find method 'org.gradle.api.artifacts.result.ResolvedComponentResult.getVariant()Lorg/gradle/api/artifacts/result/ResolvedVariantResult;'.
Possible causes for this unexpected error include:
Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network)**

The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
Stop Gradle build processes (requires restart)**

Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.

In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.

I tried clicking on the links above (labelled **) and nothing happens.

I’m using Android Studio 4 and is over 4 years old and looking at old Stackoverflow posts, they say that for errors involving ‘Unable to find method ‘org.gradle.api.artifacts.result.ResolvedComponentResult*’, an upgrade of the IDE helps.
I click on help->check for updates it says that they are available and when I click on it, it brings up a brower window but nothing appears – the tab remains blank.

I’m thinking that maybe a command line update might help and I’ve looked for cmdline-tools.

I’ve looked at Project Structure to see if there is a problem with my paths and it has two entries:

The first is the Android SDK location used by new projects and for existing projects that do not have a local.properties files with a sdk.dir property
/home/user/Android/Sdk (1)

and

The JDK that Gradle is to use when building the project
/usr/lib/jvm/jdk-11.0.24-oracle-x64 (2)

With (1) the local.properties file has the line “sdk.dir=/home/user/Android/Sdk”.

I’m at a loss as to what to do. I’ve looked at https://developer.android.com/tools and it says that command line tools should be found in android_sdk/cmdline-tools/version/bin/ but I can’t find the cmdline-tools directory or the sdkmanager utility I should use.

Is there way to resolve the problem mentioned in the first paragraph without going through the trouble of a fresh install? And if not, how do go about doing an install without using the IDE?

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật