首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >未能解决: com.amitshekhar.android:android-networking:1.0.2

未能解决: com.amitshekhar.android:android-networking:1.0.2
EN

Stack Overflow用户
提问于 2022-04-22 17:49:21
回答 1查看 796关注 0票数 0

Build.gradle(模块:app)

代码语言:javascript
复制
plugins {
    id 'com.android.application'
}

android {
    compileSdk 32

    defaultConfig {
        applicationId "com.uts.balamtour"
        minSdk 21
        targetSdk 32
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

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

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.4.1'
    implementation 'com.google.android.material:material:1.5.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'androidx.recyclerview:recyclerview:1.2.1'
    implementation 'com.google.android.gms:play-services-maps:18.0.2'
    implementation 'com.google.android.gms:play-services-location:19.0.1'

    //Rest API FAN
    implementation 'com.amitshekhar.android:android-networking:1.0.2'

    //Glide
    implementation 'com.github.bumptech.glide:glide:4.13.1'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.13.1'
}

Build.gradle(项目:app)

代码语言:javascript
复制
plugins {
    id 'com.android.application' version '7.1.2' apply false
    id 'com.android.library' version '7.1.2' apply false
}

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

当我将它导入到activity.java中时,如下所示

代码语言:javascript
复制
import com.androidnetworking.AndroidNetworking;
import com.androidnetworking.common.Priority;
import com.androidnetworking.error.ANError;
import com.androidnetworking.interfaces.JSONArrayRequestListener;

有一些错误

'androidnetworking'

  • Cannot

  • 不能解析符号'AndroidNetworking'

  • Cannot解析符号'Priority'

  • Cannot解析符号'JSONObjectRequestListener'

  • Cannot解析符号'ANError'
EN

回答 1

Stack Overflow用户

发布于 2022-04-26 14:25:16

jcenter()中添加settings.gradle,并将项目与gradle文件同步。

代码语言:javascript
复制
pluginManagement {
    repositories {
        gradlePluginPortal()
        google()
        mavenCentral()
        jcenter() //add jcenter
    }
}
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        jcenter() //add jcenter
    }
}
rootProject.name = <your app name>
include <your module name>
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71972803

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档