porcupine: Cannot process Porcupine in Pixel 4a [android 11] when app targetSdkVersion is 30
I have configured Service based sample app. And it works quite good.
I have a Pixel 4a and I wanted to set targetSdkVersion to 30 and compileSdkVersion 30.
But unfortunately I encounter with this:
com.example.androidforegroundservice I/PICOVOICE: [ERROR] invalid object cannot be used for processing.
It works as expected when I downgrade targetSdkVersion to 29
Expected behaviour
set app build.gradle file:
android {
compileSdkVersion 30
buildToolsVersion "30.0.2"
defaultConfig {
applicationId "com.example.androidforegroundservice"
minSdkVersion 15
targetSdkVersion 30 -> I want to set it to latest targetSdkVersion and Porcupine can process
.....
}
......
}
Actual behaviour
I receive the the error that I wrote above. You can check the screenshot below:

Steps to reproduce the behaviour
You can increase targetSdkVersion to 30 in order to reproduce the behaviour.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 19 (9 by maintainers)
I’m also facing the same issue. The android demo app and the version on the play store isn’t working on my pixel 4 xl running android 11. I tried on older devices and it worked but for the pixel 4xl, it fails