I am trying out the github examples referenced in the Affectiva AI docs.
See: Affectiva Android example on github
The examples work, shipping with the following project gradle configuration:
build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
defaultConfig {
minSdkVersion 21
targetSdkVersion 22
versionCode 1
setProperty("archivesBaseName", "$project.name-$versionName")
applicationId "com.affectiva.cameradetectordemo"
versionName "3.2.0-01"
}
buildTypes {
release {
minifyEnabled true
}
}
buildToolsVersion '27.0.3'
}
dependencies {
implementation('com.affectiva.android:affdexsdk:3.+')
}
The problem is, the examples work ONLY with compileSdkVersion and targetSdkVersion both set to 22. When i enter anything higher, 23 to 27, the apps compile but when i want to start the camera from inside the app, the app crashes with the Error Message
Questions:
- Why is are the Affectiva examples only working with SDK version 22?
- How can i use the affdex-sdk with a current version of the Android SDK?
Thanks for your help!