3

this is the probleme

Could not GET 'https://jitpack.io/com/github/badoualy/datepicker-line/c6dcd05737/datepicker-line-c6dcd05737.pom'. Received status code 401 from server: Unauthorized Disable Gradle 'offline mode' and sync project

this is my gradle

 allprojects {
        repositories {
            google()
            maven {   url "https://maven.google.com"   }
            maven { url "https://jitpack.io" }

            mavenCentral() // jcenter() works as well because it pulls from Maven Central
            jcenter()
        }
dependencies {

    implementation 'com.github.badoualy:datepicker-line:c6dcd05737'
    implementation 'com.github.User:Repo:Tag'
    implementation 'com.github.mybringback22:HorizontalCalendarView-Android-:0.1.0'
    //noinspection GradleCompatible
    implementation 'com.android.support:design:27.1.1'
    //vardView
    implementation "androidx.cardview:cardview:1.0.0"
    //ViewPager
    implementation 'androidx.viewpager:viewpager:1.0.0'
    //RecyclerView
    implementation 'androidx.recyclerview:recyclerview:1.1.0'
    //FloatButton
    implementation 'com.getbase:floatingactionbutton:1.10.1'

    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation 'androidx.core:core-ktx:1.3.2'
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'com.google.android.material:material:1.3.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'com.google.firebase:firebase-database:19.2.1'
    implementation 'com.google.firebase:firebase-auth:20.0.3'
    implementation 'androidx.navigation:navigation-fragment:2.3.4'
    implementation 'androidx.navigation:navigation-ui:2.3.4'
    implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.0'
    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.0'
    implementation 'androidx.navigation:navigation-fragment-ktx:2.3.4'
    implementation 'androidx.navigation:navigation-ui-ktx:2.3.4'
    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
    implementation 'com.google.android.material:material:1.0.0'
    implementation 'com.google.firebase:firebase-database:19.7.0'
    implementation platform('com.google.firebase:firebase-bom:26.8.0')
    implementation 'com.google.firebase:firebase-analytics-ktx'

    implementation 'com.google.firebase:firebase-storage:19.1.0'
    implementation 'de.hdodenhof:circleimageview:2.2.0'
    // material dialogs
    def matieral_dialogs_version = "3.1.0"
    implementation "com.afollestad.material-dialogs:core:$matieral_dialogs_version"
    implementation "com.google.android.gms:play-services-location:17.0.0"
    implementation 'com.aurelhubert:ahbottomnavigation:2.3.4'


    implementation 'com.sothree.slidinguppanel:library:3.4.0'
    implementation 'com.sothree.slidinguppanel:library:3.4.0'
    implementation 'np.com.susanthapa.curved_bottom_navigation:curved_bottom_navigation:0.6.3'

    implementation('com.alibaba.android:ultraviewpager:1.0.7.7@aar') {
        transitive = true
    }


    // Material Dialog Library
    implementation 'dev.shreyaspatil.MaterialDialog:MaterialDialog:2.1.1'

    // Material Design Library
    implementation 'com.google.android.material:material:1.0.0'

    // Lottie Animation Library
    implementation 'com.airbnb.android:lottie:3.3.6'
    //menu item
    implementation 'com.nightonke:boommenu:2.1.1'
    implementation 'com.squareup.picasso:picasso:2.71828'
    implementation 'com.google.zxing:core:3.4.0'
    implementation 'com.journeyapps:zxing-android-embedded:4.2.0'
    implementation 'androidx.appcompat:appcompat:1.0.2'

    implementation 'com.google.code.gson:gson:2.8.5'
    implementation 'androidmads.library.qrgenearator:QRGenearator:1.0.3'
    implementation 'com.firebaseui:firebase-ui-storage:3.2.2'

    implementation 'com.github.bumptech.glide:glide:4.8.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'

}

this is what i get when i enter in the link

enter image description here

  • You can check this answer to disable offline mode in Gradle. https://stackoverflow.com/a/64709073/5878833 – nicat mahirson May 26 '21 at 08:55
  • i saw it bro but it's disabled already and i didn't figured out the probleme – Mouadh Laabidi May 26 '21 at 09:01
  • Your GitHub repo is private so perhaps Jitpack needs you to authenticate in order to build the library? – msbit May 26 '21 at 09:55
  • i did it also and it show me like tho image that i post it with the question https://i.stack.imgur.com/mmA4o.png – Mouadh Laabidi May 26 '21 at 10:32
  • If by `i did it also` you mean that you added your GitHub credentials, maybe check whether you have access to https://github.com/badoualy/datepicker-line? If so, you'll be best served trying to get a hold of Jitpack support. – msbit May 26 '21 at 12:33
  • thanks my friend i figured out the solution .. i did update the sdk and i found a lot of issues – Mouadh Laabidi May 26 '21 at 14:28

2 Answers2

4

I faced a similar problem in which I can't import the library in my java class. So I find out that I must avoid delating deprecated jcenter() from allprojects libe below

allprojects {
    repositories {
        google()
        //noinspection JcenterRepositoryObsolete
        jcenter()

        maven { url "https://jitpack.io" }

        maven {
            url 'https://maven.google.com/'
        }

}
Mohamed Ben Romdhane
  • 1,005
  • 3
  • 11
  • 22
0

Solution is only Confirm Your SDK path in App

Go to build.gradle(AppLevel) file

In 'allProject{ }' section, check " maven { // GIVE ACTUAL SDK PATH // } "

ex. enter image description here

Done Keep Code