[Android] my app always crashes when i run it --Kotlin

i have made as it mentioned in keyman blog

Hi,

Are you able to build and run the KMSample1 project that came with the Keyman Engine Android zip file? (You’ll need to copy keyman-engine.aar into Samples/KMSample1/app/libs/)

If KMSample1 works for you, I wonder if you need to add the gradle dependencies in Samples/KMSample1/app/build.gradle

ext {
    currentFirebaseVersion = "15.0.2"
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support:design:27.1.1'
    api(name: 'keyman-engine', ext: 'aar')
    implementation "com.google.firebase:firebase-core:$currentFirebaseVersion"
    implementation "com.google.firebase:firebase-crash:$currentFirebaseVersion"
    implementation('com.crashlytics.sdk.android:crashlytics:2.9.2@aar') {
        transitive = true
    }
}

1- should i add firebase to my app ?
2-this is my build gradle
Preformatted text repositories {
flatDir {
dirs ‘libs’
}
google()
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile(‘proguard-android.txt’), ‘proguard-rules.pro’
}
}
}

dependencies {
implementation fileTree(dir: ‘libs’, include: [’*.jar’])
implementation"org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
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’
implementation(‘com.crashlytics.sdk.android:crashlytics:2.9.2@aar’) {
transitive = true
}
api (name:‘keyman-engine’, ext:‘aar’)
}Preformatted text

Yes, that should fix your “Failed resolution” errors

6 posts were split to a new topic: Troubleshooting Android KMSample1 and KMSample2