udacity / Android_Me

App that lets you style your own Android! This uses Fragments to create a flexible and responsive UI.
261 stars 1.01k forks source link

Build fails with android studio #81

Open arpitjain1 opened 3 years ago

arpitjain1 commented 3 years ago

I am trying to build this with android studio 4.2.1 on macOS Catalina, but it fails with following error.

Unable to find method 'com.android.build.gradle.tasks.factory.AndroidJavaCompile.setDependencyCacheDir(Ljava/io/File;)V' com.android.build.gradle.tasks.factory.AndroidJavaCompile.setDependencyCacheDir(Ljava/io/File;)V

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.

Tried stopping gradle process, didn't help.

JDK: jdk1.8.0_202.jdk Android gradle plugin version: 2.2.3 Gradle version: 4.8.1

Any suggestions ?

wdoodoo commented 2 years ago

Hello! I think the simplest way to solve the issue might be downloading old version of Android Studio in separated folders NOT in the Android Studio's default installation folder because you have another Android Studio installed already in your computer. In this way we can have different versions of Android Studios we choose which version to use for study and/or app development purpose separately.

Having Android Studio Artic Fox installed in my computer, I downloaded Android Studio 2.3.2 from https://developer.android.com/studio/archive and so far it's working without problem. By the way any upgrade suggestions which might appear while you use old version of Android Studio, just ignore them for the purpose of following the course.

Hopefully this suggestion solves your issue too. Have a good day!