Just now I have installed and started working on Android Studio, and created new project after configuring everything I needed to start working on project. In newly created project, I have not changed anything and then tried to run the project. But it is not working and throwing some dependency error I guess. Here is it
Gradle: FAILURE: Build failed with an exception.
What went wrong: A problem was found with the configuration of task ':StudioTest2:packageDebug
'.
File 'C:\Users\StudioTest2\StudioTest2\build\libs\StudioTest2-debug.dex' specified for property 'dexFile' does not exist.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Could not execute build using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.6-bin.zip'.
Unplug your device from the USB port on the computer. Restart the device by powering off and back on. Verify that Settings => Developer options => USB Debugging is enabled. Quit and re-launch Android Studio.
Clear your project directory Obviously, try to clean your project from android studio : “Build -> Clean Project”. This will clear your build folders. Clear the cache of Android Studio using “File -> Invalidate Caches / Restart” choose “Invalidate and restart option” and close Android Studio.
One thing I found that helped was to import the project after creating it, I was getting the same issue but once I imported the project (as opposed to just opening it), it built fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With