gpt4 book ai didi

android - 多次定义org.json.JSONException类型

转载 作者:行者123 更新时间:2023-12-03 05:21:34 26 4
gpt4 key购买 nike

当我在android中生成签名的APK时,此错误一次又一次地出现,并且jetified-jav-json文件正在打开。这可能是由于我的gradle文件-这是android studio生成的错误-
多次定义org.json.CDL类型:C:\ Users \ 91971.gradle \ caches \ transforms-2 \ files-2.1 \ 4ff16b76dc52b01ac4898d797a9f3375 \ jetified-java-json.jar:org / json / CDL.class,C: \ Users \ 91971 \ AndroidStudioProjects \ APS-Money-updated \ aeps_lib-1July \ build.transforms \ 832bfa6b3f0d8c75ed631f792cb4e02d \ jetified-aeps_lib-1July-runtime.jar:org / json / CDL.class
这是我的build.gradle--

  apply plugin: 'com.android.application'
android {
packagingOptions {
exclude 'AndroidManifest.xml'
}

compileSdkVersion 28
buildToolsVersion "28.0.3"

defaultConfig {
applicationId "com.aps.apsmoney"
minSdkVersion 21
targetSdkVersion 28
multiDexEnabled true
versionName "1.0"
versionCode 1
//versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
android {
lintOptions {
checkReleaseBuilds false
abortOnError false
}
}
aaptOptions { cruncherEnabled = false }

}
buildTypes {
release {

minifyEnabled true
shrinkResources true
// proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
zipAlignEnabled true
debuggable = false
jniDebuggable = false
}
}
}
依赖项{
实现fileTree(include:['* .jar'],dir:'libs')
implementation 'com.android.volley:volley:1.1.0'
implementation 'com.google.android.gms:play-services-gcm:17.0.0'
implementation 'com.squareup.picasso:picasso:2.3.2'
implementation 'de.hdodenhof:circleimageview:2.1.0'
implementation 'com.android.support:design:28.0.0'
implementation files('libs/org.apache.http.legacy.jar')
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation files('libs/signpost-core-1.2.1.2.jar')
implementation('de.keyboardsurfer.android.widget:crouton:1.8.5@aar') {
exclude group: 'com.google.android', module: 'support-v4'
}
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:multidex:1.0.3'
implementation files('libs/java-json.jar')
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation project(':aeps_lib-1July')
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.journeyapps:zxing-android-embedded:3.3.0'
implementation 'com.github.bumptech.glide:glide:4.8.0'
implementation 'androidx.multidex:multidex:2.0.1'
}

最佳答案

这是由于我添加了一些未使用的依赖关系...删除了未使用的依赖关系并解决了问题....请逐个检查删除依赖关系正在影响项目的....我花了大约1周的时间才找到thid错误...

关于android - 多次定义org.json.JSONException类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63257959/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com