4

I am trying to make use of some maven dependencies in a new Android project, but I am new to using Android-Studio and Gradle. I looked at a few other solutions such as this: How to import Maven dependency in Android Studio/IntelliJ?

and thought it looked simple enough. So I modified the build.gradle file to this:

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        maven { url 'http://repo1.maven.org/maven2' }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.4'
    }
}
apply plugin: 'android'

repositories {
    mavenCentral()
}

dependencies {
    compile 'com.google.android:android:4.1.1.4'
    compile 'com.factual:factual-java-driver:1.7.7-android'
}

android {
    compileSdkVersion 17
    buildToolsVersion "17.0.0"

    defaultConfig {
        minSdkVersion 7
        targetSdkVersion 16
    }
}

but when I compiled the project I got the error:

Gradle: A problem occurred configuring root project 'LookAroundYouProject'.
> Failed to notify project evaluation listener.
   > Main Manifest missing from /home/tstewart/AndroidStudioProjects/LookAroundYouProject/src/main/AndroidManifest.xml

I am not really sure what this is telling me. Currently it is just a simple hello world example and it worked before modifying the gradle file.

EDIT: I moved the compile statements from the Top-level build file to the one within the application itself and for some reason this seemed to work and I no longer appear to be getting errors. Sadly I have no idea why this is the case.

Community
  • 1
  • 1
Travis
  • 659
  • 13
  • 28
  • Can you switch the plugin to 'com.android.tools.build:gradle:0.5.+' and try again? The newer version fixes a lot of issues and might be better and telling us what's wrong. – Xavier Ducrohet Jul 17 '13 at 05:02
  • I changed it to 0.5.1 and now I get the error: "Gradle: Execution failed for task ':prepareDebugDependencies'. > No such property: configName for class: com.android.build.gradle.internal.dependency.DependencyChecker" – Travis Jul 17 '13 at 05:33
  • Hmm I thought I fixed this in 0.5.1. I'll double check tomorrow. – Xavier Ducrohet Jul 17 '13 at 05:54
  • I confirm this is a bug I'm going to fix this and push an update (0.5.3) – Xavier Ducrohet Jul 18 '13 at 18:22
  • 0.5.3 is out. can you try it? – Xavier Ducrohet Jul 18 '13 at 21:09
  • Is it on Maven Central? It still says 0.5.2 is the highest version available. – Travis Jul 18 '13 at 21:48
  • Well, I tried it again, I suppose it might not show up immediately on there. It did not complain that it could not find 0.5.3, but I still get the error: Gradle: A problem occurred configuring root project 'LookAroundYouProject'. > Failed to notify project evaluation listener. > Main Manifest missing from /home/tstewart/AndroidStudioProjects/LookAroundYouProject/src/main/AndroidManifest.xml – Travis Jul 18 '13 at 22:02

0 Answers0