In the process of trying to get my project running on Gradle I have installed and setup Gradle for my new project.
My problem is that I keep getting an error "Module X is not backed by Gradle". I've run gradle setupBuild
and the files seem correct, but when running in Android Studio it won't stop the error.
Here's a screenshot of what I'm getting:
So I'm wondering how to add Gradle backing to the project within Android Studio if the project is already in there.
Open your gradle. properties file in Android Studio. Restart Android Studio for your changes to take effect. Click Sync Project with Gradle Files to sync your project.
I have yet to find a good solution within Android Studio, but this has worked for me on several projects:
Also, remember to use the latest version of the Gradle build tools. If you want, you can setup Gradle to use the most recent version like this:
buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:1.1.0' } }
Simpler Solution nowadays
All you need to do is "Import Project" in android studio to import eclipse projects. After that, try to "Syncronize project" and if it fails, and pops up that error u had, it should also be accompanied with an entry in "Entry log" as to what is the problem, "Cause: failed to find target android-10" for me. Once you fix that you should be able to successfully sync project and keep on going.
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