chymtt / ReactNativeDropdownAndroid

A simple wrapper for Android's Spinner in react-native
MIT License
62 stars 22 forks source link

Could not find method compile() #18

Closed bomalley closed 8 years ago

bomalley commented 8 years ago

When I try to implement this module I get compile errors:

FAILURE: Build failed with an exception.

  • Where: Build file '/Users/bomalley/Documents/React/Acthar/android/build.gradle' line: 9
  • What went wrong: A problem occurred evaluating root project 'Acthar'. Could not find method compile() for arguments [project ':ReactNativeDropdownAndroid'] on >org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler_Decorated@2f98635e.

Here's the build.gradle:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.3.1'

        compile project(':ReactNativeDropdownAndroid')

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        mavenLocal()
        jcenter()
    }
}

Not sure how to proceed. Any ideas?

bomalley commented 8 years ago

My bad. I made the changes in the wrong build.gradle. I put them in android/build.gradle instead of android/app/build.gradle.

All good!