为什么FastNetworking库的实现在Android Studio中无法正常工作?
我尝试解决此依赖项:
implementation 'com.amitshekhar.android:android-networking:1.0.2'
但它在Android Studio中不起作用,我还补充道:
maven { url "https://jitpack.io" }
但这也不管用。
请帮助我如何解决此实现,因为我想在我的项目中使用get和post API。但此实现在我的Android Studio中不起作用。
构建.gradle(模块应用程序)
plugins {
id 'com.android.application'
}
android {
compileSdk 32
defaultConfig {
applicationId "com.example.jsonparsing"
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 'androidx.appcompat:appcompat:1.4.2'
implementation 'com.google.android.material:material:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'com.amitshekhar.android:android-networking:1.0.2'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
Settings.gradle
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url "https://jitpack.io" }
}
}
rootProject.name = "Json Parsing"
include ':app'
请问谁能告诉我如何解决这个问题?
1条答案
按热度按时间ejk8hzay1#
后藤https://mvnrepository.com/artifact/com.amitshekhar.android/android-networking/1.0.2
下载AAR文件
android studio后藤文件=〉项目结构=〉依赖项=〉应用程序=〉按+ =〉选择JAR/AAR,给予出文件的路径并让它安装,这个文件为我工作,正是我如何做到的,祝你好运