3

I imported the LeafPic project and I'm unable to sync the project. The error states that unable to resolve uz.shift:colorpicker:0.5. I searched for the web a lot and I couldn't find a solution.

build.gradle(:app)

apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

repositories {
    maven { url "https://dl.bintray.com/dasar/maven" }
    maven { url "https://s3.amazonaws.com/repo.commonsware.com" }
    maven { url "https://jitpack.io" }
    mavenCentral()
}

android {
    compileSdkVersion project.sdkVersion
    defaultConfig {
        applicationId "org.horaapps.leafpic"
        minSdkVersion 19
        targetSdkVersion project.sdkVersion
        versionName "v0.7-alpha-2"
        versionCode 16
        vectorDrawables.useSupportLibrary = true

        multiDexEnabled true
    }

    lintOptions {
        disable 'MissingTranslation'
        disable 'ExtraTranslation'
        abortOnError false
    }

    dexOptions {
        jumboMode = true
    }

    // This is handled for you by the 2.0+ Gradle Plugin
    aaptOptions {
        additionalParameters "--no-version-vectors"
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    signingConfigs {
        release
    }

    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            resValue "string", "app_name", "LeafPic"
            signingConfig signingConfigs.release
        }

        debug {
            applicationIdSuffix ".debug"
            resValue "string", "app_name", "LeafPic (debug)"
        }
    }

    flavorDimensions "default"

    productFlavors {
        noGPlay {
            dimension "default"
        }

        withGPlay {
            dimension "default"
        }
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')

    //exifInterface
    implementation "com.android.support:exifinterface:$supportVersion"

    // google & support
    implementation "com.android.support:appcompat-v7:$supportVersion"
    implementation "com.android.support:cardview-v7:$supportVersion"
    implementation "com.android.support:recyclerview-v7:$supportVersion"
    implementation "com.android.support:design:$supportVersion"
    implementation "com.android.support:palette-v7:$supportVersion"
    implementation "com.android.support:customtabs:$supportVersion"
    implementation "com.android.support:support-v4:$supportVersion"

    //exo-player
    implementation 'com.google.android.exoplayer:exoplayer-core:2.6.0'
    implementation 'com.google.android.exoplayer:exoplayer-dash:2.6.0'
    implementation 'com.google.android.exoplayer:exoplayer-ui:2.6.0'
    implementation 'com.google.android.exoplayer:exoplayer-hls:2.6.0'
    implementation 'com.google.android.exoplayer:exoplayer-smoothstreaming:2.6.0'

    // utils
    implementation 'com.github.bumptech.glide:glide:4.8.0'
    //surumu 4.7.1 den 4.8.0 ya yukseltildi
    annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'  //surumu 4.7.1 den 4.8.0 ya yukseltildi
    implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.12'
    implementation 'com.github.Commit451:bypasses:1.1.0'
    implementation 'com.jakewharton:butterknife:8.8.1'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
    implementation 'com.drewnoakes:metadata-extractor:2.11.0'
    implementation "com.orhanobut:hawk:2.0.1"
    implementation 'com.commonsware.cwac:provider:0.4.3'

    // rxJava
    implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
    //it is recommended to keep the same version of rxAndroid
    implementation 'io.reactivex.rxjava2:rxjava:2.1.13'
//    implementation 'com.jakewharton.rxrelay2:rxrelay:2.0.0'

    // icons
    implementation 'com.mikepenz:iconics-core:3.0.3@aar'
    implementation "com.mikepenz:iconics-views:3.0.3@aar"
    implementation 'com.mikepenz:google-material-typeface:3.0.1.2.original@aar'
    implementation 'com.mikepenz:community-material-typeface:2.0.46.1@aar'
    implementation 'com.mikepenz:fontawesome-typeface:4.7.0.2@aar'

    // ui
    implementation 'uz.shift:colorpicker:0.5@aar'
    implementation 'com.github.jetradarmobile:desertplaceholder:1.1.1'
    implementation 'de.hdodenhof:circleimageview:2.2.0'
    implementation 'com.github.yalantis:ucrop:2.2.2'
    implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.10.0'
    implementation 'jp.wasabeef:recyclerview-animators:2.2.7'
    implementation 'com.github.HoraApps:Liz:-SNAPSHOT'
    implementation 'com.github.lzyzsd:circleprogress:1.2.1'


    // debug Only
    //debugCompile project(':inappstoragereader')
    implementation 'cat.ereza:customactivityoncrash:2.2.0'
    debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.6.2' //1.5.4den 1.6.2 yeyukseltildi
    releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.2'  //1.5.4den 1.6.2 yeyukseltildi

    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'com.android.support:multidex:1.0.3'

    // TODO check them out
    implementation 'com.turingtechnologies.materialscrollbar:lib:10.0.3'
    implementation 'de.psdev.licensesdialog:licensesdialog:1.8.3'
}

Properties props = new Properties()
def propFile = new File('signing.properties')
if (propFile.canRead()) {
    props.load(new FileInputStream(propFile))

    if (props != null && props.containsKey('STORE_FILE') && props.containsKey('KEY_ALIAS') && props.containsKey('PASSWORD')) {
        android.signingConfigs.release.storeFile = file(props['STORE_FILE'])
        android.signingConfigs.release.storePassword = props['PASSWORD']
        android.signingConfigs.release.keyAlias = props['KEY_ALIAS']
        android.signingConfigs.release.keyPassword = props['PASSWORD']
    } else {
        println 'signing.properties found but some entries are missing'
        android.buildTypes.release.signingConfig = null
    }
} else {
    println 'signing.properties not found'
    android.buildTypes.release.signingConfig = null
}

Displayed error is:

Failed to resolve: uz:shiftcolorpicker:0.5
Show in Project Structure dialog
Affected Modules: app

recordnotfound.com states that the issue is 3 years old and it is still marked as an open issue.

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
Hakeem MRK
  • 41
  • 7

3 Answers3

3

A work around i found is to download the aar and import it as module. You can download the aar from the github for the repository or click here

Then you can follow the procedure here to import the module

You should remove dependencies in both build.gradle relating to uz.shift:colorpicker:0.5

Don't forget to add the module/library to your dependency like this:

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

implementation 'androidx.appcompat:appcompat:1.1.0'
........
implementation project(path: ':colorpicker-0.5')
........
}

Then sync your android studio project.

Yusuf Adefolahan
  • 312
  • 2
  • 11
0

add in project level gradle file:

repositories {
     maven {
        url  "http://dl.bintray.com/dasar/maven"
     }
}

add in app(module) level gradle file:

implementation(group: 'uz.shift', name: 'colorpicker', version: '0.5', ext: 'aar')

Edit:

download the aar file from here and put it in libs folder: https://bintray.com/dasar/maven/shiftcolorpicker/0.5

add this line in app gradle:

dependencies {
  implementation fileTree(dir: 'libs', include: ['*.aar'])
}
Guy4444
  • 1,411
  • 13
  • 15
0

I got same issue in one of my older apps, seems like it doesn't work with gradle 6.5.

To solve this, I downloaded whole repo from github. https://github.com/DASAR-zz/ShiftColorPicker

import shiftcolorpicker module in project and in gradle put :

 implementation project(path: ':shiftcolorpicker')
Rahul Singh
  • 161
  • 2
  • 9