stfalcon-studio / ChatKit

Android library. Flexible components for chat UI implementation with flexible possibilities for styling, customizing and data management. Made by Stfalcon
http://stfalcon.com
Apache License 2.0
3.68k stars 828 forks source link

Could not GET 'https://google.bintray.com/flexbox-layout/com/google/android/flexbox/1.0.0/flexbox-1.0.0.pom'. #356

Open choonyan116 opened 3 years ago

choonyan116 commented 3 years ago

I get this error after I try the solution in https://github.com/stfalcon-studio/ChatKit/issues/234.

buildscript { repositories { google() mavenCentral() mavenLocal() maven { url "https://google.bintray.com/flexbox-layout" } } dependencies { classpath "com.android.tools.build:gradle:4.2.2" classpath 'com.google.gms:google-services:4.3.8'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}

}

allprojects { repositories { google() mavenCentral() mavenLocal() maven { url "https://dl.cloudsmith.io/public/cometchat/cometchat-pro-android/maven/" } maven { url 'https://jitpack.io' } // Warning: this repository is going to shut down soon

    maven { url "https://google.bintray.com/flexbox-layout" }
}

}

task clean(type: Delete) { delete rootProject.buildDir }

Here is error that I get: Could not GET 'https://google.bintray.com/flexbox-layout/com/google/android/flexbox/1.0.0/flexbox-1.0.0.pom'. Received status code 403 from server: Forbidden Disable Gradle 'offline mode' and sync project

SoNep commented 3 years ago

same problem

trivm102 commented 3 years ago

same problem.

Hatzen commented 3 years ago

This relates to bintrays shoutdown since 1st May. https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/

use https://jitpack.io/docs/ with implementation 'com.github.google:flexbox-layout:1.0.0' instead

Iceberry-qdd commented 3 years ago

https://github.com/stfalcon-studio/ChatKit/issues/356#issuecomment-890407129

I did this,but it doesn't work for me.The new errors are as follows:

2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not find com.google.android:flexbox:1.0.0.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/com/google/android/flexbox/1.0.0/flexbox-1.0.0.pom
       - https://repo.maven.apache.org/maven2/com/google/android/flexbox/1.0.0/flexbox-1.0.0.pom
       - https://jitpack.io/com/google/android/flexbox/1.0.0/flexbox-1.0.0.pom
     Required by:
         project :app > com.github.stfalcon-studio:Chatkit:0.4.1
Hatzen commented 3 years ago

Can you provide your changes please?


  1. your project build.gradle file should look like:

    
    buildscript {
    ...
    }

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


and your app build.gradle :  

android { .... }

dependencies { .... implementation 'com.github.google:flexbox-layout:1.0.0' }

After syncing i get no error so the dependency should have been found also in the build.  
Maybe try "Build -> Clean Project" and "File -> Invalidate Caches and Restart"

--------
2. or if you already using AndroidX just use 
implementation 'com.google.android:flexbox:2.0.1'

from jcenter() 
Iceberry-qdd commented 3 years ago

Thanks! I am indeed using AndroidX. I built it successfully After using

    implementation 'com.google.android:flexbox:2.0.1'

from jcenter() But JCenter Maven repository is no longer receiving updates,so i think this isn't the best solution. This time,my build.gradle files are as follows: 1.project build.gradle:

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.2.2'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}
allprojects {
    repositories {
        google()
        mavenCentral()
        maven { url 'https://jitpack.io' }
        jcenter()
    }
}
task clean(type: Delete) {
    delete rootProject.buildDir
}

2.app build.gradle:

plugins {
    id 'com.android.application'
    id 'kotlin-android'
}

android {
    compileSdk 30

    defaultConfig {
        applicationId "com.iceberry.chatkitdemo"
        minSdk 21
        targetSdk 30
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    viewBinding{
        enabled=true
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }
}

dependencies {

//    implementation 'com.github.google:flexbox-layout:1.0.0'
    implementation 'com.google.android:flexbox:2.0.1'

    implementation 'com.github.bumptech.glide:glide:4.12.0'
    implementation 'com.github.stfalcon-studio:Chatkit:0.4.1'
    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 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'
    implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
    implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}