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
delete C:\Users\username\caches
folder.
Open the project on Android Studio and let it solve the problems for you
It immediately shows at the left bottom:
Then click that link, and it will fix the right files for you.
This ended up fixing the Gradle version as mentioned at: https://stackoverflow.com/a/37091489/895245 but it also fixed further errors, so it is the easiest thing to do.
Tested on https://github.com/googlesamples/android-vulkan-tutorials/tree/7ba478ac2e0d9006c9e2e261446003a4449b8aa3/tutorial05_triangle , Android Studio 2.3, Ubuntu 14.04.
Whenever you update your Gradle files do not forget to check the compatible Gradle wrapper distibutionUrl
, in your case it happened because of the same.
distributionUrl=https://services.gradle.org/distributions/gradle-5.6.4-all.zip
In my case delete your gradle file and then again import your file again it will work
First of all, before trying the most complicated things you should make the step easier, in my case this bug just happened on my way until the project contained 'spaces' for example:
Replace:
C://Users/Silva Neto/OneDrive/Work space/project
With:
C://Users/SilvaNeto/OneDrive/Workspace/project
Notice that we replaced spaces with camelCase
but you can choose any naming scheme you like, and hopefully this could solve your issue.
I hope this will help.