Я следую инструкциям по добавлению имени пользователя Google в мое приложение для Android: https://aws -amplify.github.io / docs / android / authentication # google-login-in-your-mobile-app
И я получаю эту ошибку:
E/AndroidRuntime: FATAL EXCEPTION: Thread-4
Process: com.xxxx.xxxx, PID: 16057
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/amazonaws/mobile/auth/userpools/CognitoUserPoolsSignInProvider;
(обратите внимание, что сообщение об ошибке намного длиннее)
Моя AuthenticatorActivity выглядит точно так же, как они предоставляют (с необходимостью импорта).Я предполагаю, что это как-то связано с app / build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.xxxx.xxxx"
minSdkVersion 23
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
// Mobile Client for initializing the SDK
implementation('com.amazonaws:aws-android-sdk-mobile-client:2.8.+@aar') { transitive = true }
// Google SignIn
implementation 'com.android.support:support-v4:28.+'
implementation('com.amazonaws:aws-android-sdk-auth-google:2.8.+@aar') { transitive = true }
// Sign in UI Library
implementation 'com.android.support:appcompat-v7:28.+'
implementation('com.amazonaws:aws-android-sdk-auth-ui:2.8.+@aar') { transitive = true }
implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation fileTree(dir: 'libs', include: ['*.jar'])
// implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
Но я не уверен, что именно.Что-то с тем, как я импортирую мобильный клиент?Это то, как они говорят, что это должно быть сделано.