I am working on an app. In my app there is no error in code but when I try to run my project it gives following errors.
Error:(1, 1) A problem occurred e
As in Accepted post, the problem solved with updating gradle to 4.4.1.
My Problem solved this way.
Delete gradle cache files.
It can be in path like
C:\Users\username\.gradle\caches
for Windows users.
For UNIX based operating systems it will be
~/.gradle/caches
.
i fixed it by upgrade to gradle-5.6.4-all.zip
in project\gradle\wrapper\gradle-wrapper.properties
#Wed Mar 11 15:20:29 WAT 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
In my case, if your version of build tools in the build.gradle file in the root folder like :
classpath 'com.android.tools.build:gradle:3.x.x' <--- version of tools
is not supported by the Gradle installed in your project, you can check the build tools/plugin supported versions here, and make sure that the version installed in your project is supported by that version of Gradle.
You don't need to upgrade Gradle, you just check if it supports the plugin installed in your project or not.
Inside my project there is a .gradle
folder which had cached the previous gradle version I was using (5.4.1) and gradle kept using that instead of my newly downloaded one (5.6.4).
Simply:
In case this didn't work you can also try the following:
"distributionUrl"
and making sure that all modules have the latest version. .gradle/caches
under your root gradle folder, usually C://Users/{you}/.gradle
gradle build --stacktrace
, --info
, --scan
or --debug
in your AS terminal to get help and more info to debug your problem.When I had this problem was beacuse my directory had non ASCII characteres. Try changing it