Tuesday, 15 April 2014

Issues with Importing Volley to Android Studio -



Issues with Importing Volley to Android Studio -

for reason can't import volley plugin android studio, getting next error:

error:(9, 0) build script error, unsupported gradle dsl method found: 'compile()'! possible causes be: - using gradle version method absent (<a href="open_gradle_settings">fix gradle settings</a>) - didn't apply gradle plugin provides method (<a href="apply_gradle_plugin">apply gradle plugin</a>) - or there error in build script (<a href="goto_source">goto source</a>)

here build.gradle

// top-level build file can add together configuration options mutual sub-projects/modules. buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:0.12.2' compile 'com.mcxiaoke.volley:library:1.0.6' // note: not place application dependencies here; belong // in individual module build.gradle files } } allprojects { repositories { jcenter() } }

this comment in build file:

// note: not place application dependencies here; belong // in individual module build.gradle files

means shouldn't set these dependency statements in file. belong in build.gradle file that's in module directory.

android android-gradle build.gradle

No comments:

Post a Comment