-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unresolved reference: S #32
Comments
|
I also have this issue and I also tried it on the example, where I first changed the pubspec.yaml file to not get this package from ../, and there, indeed, the issue was fixed after running Do you have any clue why this fix doesn't work on my project? |
Can you try setting the android {
compileSdkVersion 31
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
applicationId "com.pravera.flutter_foreground_task_example"
minSdkVersion 23
targetSdkVersion 31
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
...
} And add the exported option to the MainActivity tag of the AndroidManifest file.
|
That worked! |
Thks, it has worked for me too! ^^ |
When I compile the app with Visual Studio Code it gives me the following error:
e: C:\Projects\flutter.pub-cache\hosted\pub.dartlang.org\flutter_foreground_task-3.5.0\android\src\main\kotlin\com\pravera\flutter_foreground_task\service\ForegroundService.kt: (210, 53): Unresolved reference: S
e: C:\Projects\flutter.pub-cache\hosted\pub.dartlang.org\flutter_foreground_task-3.5.0\android\src\main\kotlin\com\pravera\flutter_foreground_task\service\ForegroundService.kt: (211, 13): Unresolved reference: setForegroundServiceBehavior
e: C:\Projects\flutter.pub-cache\hosted\pub.dartlang.org\flutter_foreground_task-3.5.0\android\src\main\kotlin\com\pravera\flutter_foreground_task\service\ForegroundService.kt: (211, 55): Unresolved reference: FOREGROUND_SERVICE_IMMEDIATE
Thks.
The text was updated successfully, but these errors were encountered: