title: Using Jcenter with gradle in Android studio
body: <p>Edit: Figured it out, I implemented JBaruch's suggestion to the allprojects->repositories section of the project-wide build.gradle file.</p>
  
  <p>I am writing a project that depends upon IOIO. Compiling IOIO's libs on my project is giving me trouble. I have tried placing the .aar and .jar files directly in my libs/ directory. However, working with .aar files in gradle is proving to be a trouble-mite. Now, I am attempting to use jcenter to find these libs.</p>
  
  <p>Using jcenter as my repository, gradle originally could not resolve</p>
  
  <p><code>com.github.ytai.ioio:IOIOLibCore</code></p>
  
  <p>but specifying version number 5.05 fixed this. However, now gradle is failing to resolve</p>
  
  <p><code>com.sparetimelabs:purejavacomm:0.0.22</code></p>
  
  <p>which is not a library that I ask to be compiled with my project.</p>
  
  <p>Below is a copy of my app/build.gradle file</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 23
      buildToolsVersion "23.0.1"
  
      defaultConfig {
          applicationId "com.example.agrc.elkausbtransfer"
          minSdkVersion 15
          targetSdkVersion 23
          versionCode 1
          versionName "1.0"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  dependencies {
          compile 'com.android.support:appcompat-v7:23.0.1'
          compile 'com.github.ytai.ioio:IOIOLibCore:5.05'
          compile 'com.github.ytai.ioio:IOIOLibPC:5.05'
          compile 'com.github.ytai.ioio:IOIOLibAndroid:5.05'
          compile 'com.github.ytai.ioio:IOIOLibAndroidAccessory:5.05'
          compile 'com.github.ytai.ioio:IOIOLibAndroidDevice:5.05'
          /* To use IOIO from source
          compile fileTree(dir: 'libs', include: ['*.jar'])
          compile(name: 'IOIOLibAndroid-release', ebxt: 'aar')
          compile(name: 'IOIOLibAndroidAccessory-release', ext: 'aar')
          compile(name: 'IOIOLibAndroidDevice-release', ext: 'aar')
          */
      }
  </code></pre>
  
  <p>After trying JBaruch's suggestion and adding the maven url to my Project (root) build.gradle file, I noticed that the Gradle Build file looks as follows:</p>
  
  <pre><code>    Executing tasks: [:app:assembleDebug]
  
  Configuration on demand is an incubating feature.
  
  FAILURE: Build failed with an exception.
  
  * What went wrong:
  A problem occurred configuring project ':app'.
  &gt; Could not resolve all dependencies for configuration ':app:_debugCompile'.
     &gt; Could not find com.sparetimelabs:purejavacomm:0.0.22.
       Searched in the following locations:
           https://jcenter.bintray.com/com/sparetimelabs/purejavacomm/0.0.22/purejavacomm-0.0.22.pom
           https://jcenter.bintray.com/com/sparetimelabs/purejavacomm/0.0.22/purejavacomm-0.0.22.jar
           file:/home/eric/Libs/Android/extras/android/m2repository/com/sparetimelabs/purejavacomm/0.0.22/purejavacomm-0.0.22.pom
           file:/home/eric/Libs/Android/extras/android/m2repository/com/sparetimelabs/purejavacomm/0.0.22/purejavacomm-0.0.22.jar
           file:/home/eric/Libs/Android/extras/google/m2repository/com/sparetimelabs/purejavacomm/0.0.22/purejavacomm-0.0.22.pom
           file:/home/eric/Libs/Android/extras/google/m2repository/com/sparetimelabs/purejavacomm/0.0.22/purejavacomm-0.0.22.jar
       Required by:
           ElkaUsbTransfer:app:unspecified
           ElkaUsbTransfer:app:unspecified &gt; com.github.ytai.ioio:IOIOLibPC:5.05
  
  * Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
  
  BUILD FAILED
  
  Total time: 2.061 secs
  </code></pre>
  
  <p>I.e., Gradle did not search at the maven url provided. How do I force Gradle to do this?</p>