DynamoDBmapper を使用して Amazon DynamoDB を使用しているアプリを開発しています。次のエラーが表示されます。
以下はlogcatです:
E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.NoClassDefFoundError: com.amazonaws.org.apache.commons.logging.LogFactory
at com.amazonaws.mobileconnectors.dynamodbv2.dynamodbmapper.DynamoDBMapper.
ここで提案されていることをすべて実行した後でも、エラーが解消されません。
誰かが私を助けることができますか?
Androidスタジオを使用しています。libs フォルダーに commons-logging.jar を追加しました。
ここで他に何を言及すればよいかわかりません。特定の質問をしていただければ、お答えできます。
みんな..助けてください。まだ運がなくても、これに対する解決策を見つけようとしてすでに1週間無駄にしています。
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' }