所以我尝试设置一个aws数据库,并按照以下设置教程进行设置:http://docs.aws.amazon.com/mobile/sdkforandroid/developerguide/getting-started-store-query-app-data.html
但没有一个进口有效!当我导入以下内容时:
import com.amazonaws.services.dynamodbv2.*;
import com.amazonaws.mobileconnectors.dynamodbv2.dynamodbmapper.*;
import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBAttribute;
import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBHashKey;
import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper;
import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBScanExpression;
import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBTable;
import com.amazonaws.services.dynamodbv2.datamodeling.PaginatedScanList;
这是我的依赖项:
compile 'com.amazonaws:aws-android-sdk-core:2.3.3'
compile 'com.amazonaws:aws-android-sdk-cognito:2.3.3'
compile 'com.amazonaws:aws-android-sdk-s3:2.3.3'
compile('com.amazonaws:aws-android-sdk-mobileanalytics:2.3.3')
compile('com.amazonaws:aws-android-sdk-apigateway-core:2.3.3')
compile 'com.amazonaws:aws-android-sdk-cognitoidentityprovider:2.3.3'
答案 0 :(得分:1)
由于dynamoDB位于com.amazonaws:aws-android-sdk-ddb:2.2。+。
如果要使用dynamoDB映射器类来使用POJO,则需要导入
com.amazonaws:AWS-Android的SDK-DDB映射器:2.2 +。
所以请改用
compile 'com.amazonaws:aws-android-sdk-core:2.2.+'
compile 'com.amazonaws:aws-android-sdk-cognito:2.2.+'
compile 'com.amazonaws:aws-android-sdk-cognitoidentityprovider:2.2.+'
compile 'com.amazonaws:aws-android-sdk-ddb:2.2.+'
compile 'com.amazonaws:aws-android-sdk-ddb-mapper:2.2.+'