android dynamodb中出错--NoClassDefFoundError logging.LogFactory
我正在开发一个应用程序,我正在使用Amazon DynamoDB和DynamoDBmapper。我得到以下错误 以下是日志:android dynamodb中出错--NoClassDefFoundError logging.LogFactory,android,amazon-web-services,amazon-dynamodb,logfactory,Android,Amazon Web Services,Amazon Dynamodb,Logfactory,我正在开发一个应用程序,我正在使用Amazon DynamoDB和DynamoDBmapper。我得到以下错误 以下是日志: E/AndroidRuntime: FATAL EXCEPTION: main java.lang.NoClassDefFoundError: com.amazonaws.org.apache.commons.logging.LogFactory at com.amazonaws.mobileconnectors.dynamodbv2.dynamodbmapper.Dy
E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.NoClassDefFoundError: com.amazonaws.org.apache.commons.logging.LogFactory
at com.amazonaws.mobileconnectors.dynamodbv2.dynamodbmapper.DynamoDBMapper.
即使在我做了所有建议的事情之后,我也没有摆脱这个错误
有人能帮我吗
我正在使用Android Studio。我在libs文件夹中添加了commons-logging.jar
我不知道我在这里还提到了什么。如果你能问一个特别的问题,我可以回答
伙计们。。请帮忙。已经浪费了一个星期的时间试图找到解决方案,但没有任何运气
AWS Android SDK:2.2.13 build.gradle:
问题在于DynamoDB mapper的版本不正确。请将
com.amazonaws:aws android sdk ddb mapper
升级到2.2.13或更高版本。AWS Android SDK库的结构已从2.1.x更改为2.2.x。请不要把它们混在一起
PS:在Android项目中使用Apache HttpClient 4.3可能会造成麻烦,因为Android有其旧版HttpClient。AWS Android SDK的版本是什么?最新版本是v2.2.14。如何使用SDK?请共享build.gradle文件好吗?AWS Android SDK:2.2.13请检查我的编辑
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' }