5

I have just updated android studio 3.6.1. after this update, I updated all plugins. Now Gradle syncing is failed. Please check the below errors.

Caused by: org.gradle.tooling.BuildException: Failed to process C:\user\app\build\intermediates\compile_and_runtime_not_namespaced_r_class_jar\debug\R.jar
Caused by: com.android.builder.dexing.DexArchiveBuilderException: Error while dexing.
Caused by: com.android.builder.dexing.DexArchiveBuilderException: Failed to process C:\Users\app\build\intermediates\javac\debug\classes
Error while dexing.
Syn3sthete
  • 4,151
  • 3
  • 23
  • 41
ashish
  • 217
  • 1
  • 11
  • Have you tried Cleaning your project? – Eric Mar 02 '20 at 13:42
  • Yes I tried clean project, invalidate cache and restart. – ashish Mar 02 '20 at 14:42
  • did you try to delete your build folder? – DemoDemo Mar 02 '20 at 19:42
  • yes I tried, but it is not working. – ashish Mar 03 '20 at 04:32
  • The issue is resolved after updating the project-level build Gradle. classpath 'com.android.tools:r8:1.7.23-dev' in dependencies and maven { url 'http://storage.googleapis.com/r8-releases/raw' } in repositories. – ashish Mar 05 '20 at 03:44
  • related [here](https://stackoverflow.com/questions/61274052/android-studio-problem-with-compiling-the-process-cannot-access-the-file-becaus) and [here](https://stackoverflow.com/questions/60547695/why-do-i-get-file-is-used-by-another-process-errors-when-i-run-the-project-wit) – Richard Le Mesurier May 06 '20 at 13:44

1 Answers1

0

I also got a similar problem for a specific project after upgrading to android studio 3.6.1. I tried a couple of things but what worked for me was removing the following line top-level build file

classpath 'com.android.tools:r8:1.5.70'
NthApostle
  • 3
  • 1
  • 2
  • 5
  • The issue is resolved after updating the project-level build Gradle.` classpath 'com.android.tools:r8:1.7.23-dev' ` in dependencies and `maven { url 'storage.googleapis.com/r8-releases/raw' } ` in repositories. – ashish Mar 05 '20 at 03:46
  • That doesn't work for me. I get the error "Caused by: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find com.android.tools:r8:1.7.23-dev" – NthApostle Mar 06 '20 at 11:23