estoy intentando añadir este implementation:
implementation "android.arch.lifecycle:runtime:$lifecycle_version"
Pero al sincronizar el proyecto me da este error:
ERROR: Could not get unknown property 'lifecycle_version' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
El implementation lo he sacado de aquí: https://stackoverflow.com/questions/57234180/issue-violation-of-interfering-with-apps-third-party-ads-or-device-functional
Mi build.grade:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:28.0.0'
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.google.android.gms:play-services-ads:17.2.0'
implementation "android.arch.lifecycle:runtime:$lifecycle_version"
}
def lifecycle_version = "2.0.0"
, o colocar directamente la version ->implementation 'android.arch.lifecycle:runtime:2.0.0'