A problem occurred configuring root project ‘cht-android’.
Could not resolve all dependencies for configuration ‘:classpath’.
Could not load module metadata from .gradle/caches/modules-2/metadata-2.97/descriptors/com.squareup/javawriter/2.5.0/a8be1fe3b3911d3d3425fe720cf42835/descriptor.bi
It doesn’t look like a specif problem in the cht-android but more something from Gradle or maybe Android Studio trying to setup the project with Gradle. I would recommend to do the following from the command line:
Close Android Studio if you have it open.
From the command line execute the following commands (at the root folder of the project):
These commands will stop any Gradle daemon and clean any cache. Now try to assemble the app with make assemble to see what happens. If it works, try with Android Studio again in case the error started there.
Thank you for the reply,
but the ./gradlew clean is failing with the same error
even though I continued the other steps, “make assemble” also failed.
Here is the complete error message:
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project ‘cht-android’.
Could not resolve all dependencies for configuration ‘:classpath’.
Could not load module metadata from .gradle/caches/modules-2/metadata-2.97/descriptors/com.squareup/javawriter/2.5.0/a8be1fe3b3911d3d3425fe720cf42835/descriptor.bin
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.
Stuck at this after cleaning the cache. Other android projects in my system are working fine as is. Can you figure out any other issue using the screenshot?
I am using jdk 11 only.
This seems to be working.
One of the previous replies had a clean first then rm -Rf,
I think the order is corrected in your reply.
Thanks a lot.