I have an Android Studio app. It has a library dependency (Android-Bootstrap), when I try to sync gradle, it gives me an error:
Configuration with nam
The message is a known Gradle bug. The reason of your error is that some of your gradle.build
files has no apply plugin: 'java'
in it. And due to the bug Gradle doesn't say you, where is the problem.
But you can easily overcome it. Simply put apply plugin: 'java'
in every your 'gradle.build'
I am facing same problem, I was fixed it by generating gradle project and then adding lib project to android studio
First, See build.gradle file is present in project root directory
if not then, Create gradle project,
Case matters
I manually added a submodule :k3b-geohelper
to the
settings.gradle
file
include ':app', ':k3b-geohelper'
and everthing works fine on my mswindows build system
When i pushed the update to github the fdroid build system failed with
Cannot evaluate module k3b-geohelper : Configuration with name 'default' not found
The final solution was that the submodule folder was named k3b-geoHelper
not k3b-geohelper
.
Under MSWindows case doesn-t matter but on linux system it does
I also faced the same problem and the problem was that the libraries were missing in some of the following files.
settings.gradle, app/build.gradle, package.json, MainApplication.java
Suppose the library is react-native-vector-icons then it should be mentioned in following files;
compile project(':react-native-vector-icons')
include ':react-native-vector-icons' project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
Import the dependency: import com.oblador.vectoricons.VectorIconsPackage;
and then add: new VectorIconsPackage() in getPackages() method.
I had this issue with Jenkins. The cause: I had renamed a module module
to Module
. I found out that git had gotten confused somehow and kept both module
and Module
directories, with the contents spread between both folders. The build.gradle
was kept in module
but the module's name was Module
so it was unable to find the default configuration.
I fixed it by backing up the contents of Module
, manually deleting module
folder from the repo and restoring + pushing the lost files.
compile fileTree(dir: 'libraries', include: ['Android-Bootstrap'])
Use above line in your app's gradle file instead of
compile project (':libraries:Android-Bootstrap')