我正在開發一個應用程序,我正在使用DynamoDBmapper使用Amazon DynamoDB。我收到以下錯誤。錯誤在android dynamodb - NoClassDefFoundError logging.LogFactory
下面是一個logcat的:
E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.NoClassDefFoundError: com.amazonaws.org.apache.commons.logging.LogFactory
at com.amazonaws.mobileconnectors.dynamodbv2.dynamodbmapper.DynamoDBMapper.
即使我這樣做,建議here的一切,我沒有擺脫錯誤的。
有人可以幫助我嗎?
我正在使用Android Studio。我在libs文件夾中添加了commons-logging.jar。
我不知道我在這裏還提到了什麼。如果您可以提出特定問題,我將能夠回覆。
夥計們..請幫助。已經浪費了一個星期,試圖找到解決方案,但沒有任何運氣。
AWS Android SDK中:2.2.13
的build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '23.0.3'
defaultConfig {
applicationId "com.example.lenovo.dynamodb6"
minSdkVersion 17
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets {
main {
resources.srcDirs = ['src/main/java']
}
}
productFlavors {
}
repositories {
jcenter()
} }
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile files('libs/commons-logging-1.2.jar')
compile files('libs/commons-codec-1.6.jar')
compile files('libs/jackson-core-2.5.3.jar')
compile files('libs/httpcore-4.3.3.jar')
compile files('libs/httpclient-4.3.6.jar')
compile files('libs/jackson-annotations-2.5.0.jar')
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.amazonaws:aws-android-sdk-core:2.2.13'
compile 'com.amazonaws:aws-android-sdk-ddb:2.2.13'
compile 'com.amazonaws:aws-android-sdk-ddb-mapper:2.1.8' }
AWS Android SDK的版本是什麼?最新的一個是v2.2.14。你如何使用SDK?你能不能分享你的build.gradle文件? – Yangfan
AWS Android SDK:2.2.13 –
請檢查我的編輯 –