My app works fine while using the Android Studio Emulator. I have a problem running it on real devices. It works on Android 7.1.2 but doesn't work on Android 7.0
I tried to change the "CompileSdkVersion" from 26 to 24.
What changes should I do in my Build.gradle file to fix this problem?
Code:
compileSdkVersion 24
buildToolsVersion '25.0.0'
defaultConfig {
applicationId "com.roomit.yonatan.projectx"
minSdkVersion 21
targetSdkVersion 24
versionCode 6
versionName "1.6"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:24.2.1'
//compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support:design:24.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:support-v4:24.+'
compile 'com.android.support:recyclerview-v7:24.2.1'
//compile 'com.android.support:recyclerview-v7:26.0.0-alpha1'
compile 'com.android.support:cardview-v7:24.2.1'
//compile 'com.android.support:cardview-v7:26.0.0-alpha1'
testCompile 'junit:junit:4.12'
}