Skip to content

Error to use the Fast Android Networking #611

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
juanfernandodev opened this issue Jan 28, 2025 · 2 comments
Open

Error to use the Fast Android Networking #611

juanfernandodev opened this issue Jan 28, 2025 · 2 comments

Comments

@juanfernandodev
Copy link

Hello,

I take an Android project that use this lib to perform networking calls, my specific problem is the follow:

The project originally uses this line to get this dependency: implementation 'com.amitshekhar.android:android-networking:1.0.1'.

Recently, when I sync the project, it throws this:

Could not determine the dependencies of task ':app:compileDesarrolloDebugKotlin'.
> Could not resolve all files for configuration ':app:desarrolloDebugRuntimeClasspath'.
   > Failed to transform android-networking-1.0.1.aar (com.amitshekhar.android:android-networking:1.0.1) to match attributes {artifactType=android-res, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Could not find android-networking-1.0.1.aar (com.amitshekhar.android:android-networking:1.0.1).
        Searched in the following locations:
            https://jcenter.bintray.com/com/amitshekhar/android/android-networking/1.0.1/android-networking-1.0.1.aar
            https://jcenter.bintray.com/com/amitshekhar/android/android-networking/1.0.1/android-networking-1.0.1.jar

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

So, I search in google about this dependency and find this repository, following the steps to implement the lib, I got a similar error:

Could not determine the dependencies of task ':app:compileDesarrolloDebugKotlin'.
> Could not resolve all files for configuration ':app:desarrolloDebugRuntimeClasspath'.
   > Could not find com.github.amitshekhariitbhu.Fast-Android-Networking:android-networking:1.0.1.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/com/github/amitshekhariitbhu/Fast-Android-Networking/android-networking/1.0.1/android-networking-1.0.1.pom
       - https://jcenter.bintray.com/com/github/amitshekhariitbhu/Fast-Android-Networking/android-networking/1.0.1/android-networking-1.0.1.pom
       - https://jitpack.io/com/github/amitshekhariitbhu/Fast-Android-Networking/android-networking/1.0.1/android-networking-1.0.1.pom
     Required by:
         project :app

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
@juanfernandodev
Copy link
Author

juanfernandodev commented Jan 28, 2025

This is build.gradle(app)

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'

androidExtensions {
    experimental = true
}

def keystorePropertiesFile = rootProject.file("keystore.properties")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))

android {
    compileSdkVersion 31
    defaultConfig {
        applicationId "com.softmed.logistica.preventista"
        minSdkVersion 21
        targetSdkVersion 31
        versionName "1.8.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
        multiDexEnabled = true
        buildConfigField "String", "VERSION_NAME", "\"${versionName}\""
    }
    
    buildTypes {
        release {
            signingConfig signingConfigs.release
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    flavorDimensions += "ambiente"
   

    viewBinding {
        enabled = true
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    kotlinOptions {
        jvmTarget = "1.8"
    }
}

dependencies {
    ....
    implementation 'com.github.amitshekhariitbhu.Fast-Android-Networking:android-networking:1.0.1'
    ....
}

@juanfernandodev
Copy link
Author

This is build.gradle (.)

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    ext.kotlin_version = '1.6.20'
    ext.anko_version='0.10.5'
    repositories {
        google()
        jcenter()
        maven { url = uri("https://jitpack.io") }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:7.4.1'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath("com.google.gms:google-services:4.4.2")
        classpath("com.google.firebase:firebase-crashlytics-gradle:2.8.0")

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

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant