0

I want to add this repository to my Android Studio project and I tried multiple dependencies but it just doesn't work. Any help, guys ?

My build.gradle (app) file:

apply plugin: 'com.android.application' android { compileSdkVersion 24 buildToolsVersion "24.0.2" defaultConfig { applicationId "com.example.myapp" minSdkVersion 21 targetSdkVersion 23 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:support-v4:24+' compile 'com.7heaven.widgets:segmentcontrol:1.16' compile 'at.bookworm:segcontrol:1' //THIS GUY IS MY PROBLEM } 

My build.gradle (app) file:

buildscript { repositories { jcenter() maven { url "https://jitpack.io" } } dependencies { classpath 'com.android.tools.build:gradle:2.1.3' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { jcenter() } } 
2
  • I can't find this project in jcenter. Commented Sep 9, 2016 at 12:13
  • Did you try compile 'com.github.bookwormat:segcontrol:master-SNAPSHOT'? If not why have you included jitpack repository? Commented Sep 9, 2016 at 12:21

3 Answers 3

4
  1. Download the Library from Github.
  2. Unzip.
  3. In Android Studio go to File > New > Import Module and set the directory to "Library" folder inside "segcontrol-master".
Sign up to request clarification or add additional context in comments.

Comments

0

This worked out for me:

Open your project in Android Studio Download the library (using Git, or a zip archive to unzip) Go to File > Project Structure >Click on the more on the left green "+" button > import Module dependency in to your workplace. Then add that module to your project. Select "your Library"

Comments

0

What you want to achieve with this approach is to include a jCenter library via maven. But this repository is not uploaded to jCenter. You should be able to include the lib by downloading the sources and import the lib module or create a sysmlink to the libmodule in you project's root.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.