cannot find symbol startForeground(FOREGROUND_SERVICE_TYPE_MICROPHONE, notification);
See original GitHub issueBug report
- I’ve checked the example to reproduce the issue.
At the time building the app, the package throwing error saying
/Users/ad/MY COOL APP/node_modules/react-native-callkeep/android/src/main/java/io/wazo/callkeep/VoiceConnectionService.java:59: error: cannot find symbol
import static android.content.pm.ServiceInfo.FOREGROUND_SERVICE_TYPE_MICROPHONE;
^
symbol: static FOREGROUND_SERVICE_TYPE_MICROPHONE
location: class ServiceInfo
/Users/ad/MY COOL APP/node_modules/react-native-callkeep/android/src/main/java/io/wazo/callkeep/VoiceConnectionService.java:251: error: cannot find symbol
startForeground(FOREGROUND_SERVICE_TYPE_MICROPHONE, notification);
^
symbol: variable FOREGROUND_SERVICE_TYPE_MICROPHONE
location: class VoiceConnectionService
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 errors
- Reproduced on:
- Android
- iOS
Description
Steps to Reproduce
Install the package, follow the installation process https://github.com/react-native-webrtc/react-native-callkeep/blob/master/docs/android-installation.md
Versions
- Callkeep: "^4.0.0"
- React Native: "0.63.2"
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Flutter/Android cannot find symbol startForeground()
I've been trying to get a background service working on Android. But Android keeps telling me that startForeground() cannot be found despite ...
Read more >How to Resolve The Cannot Find Symbol Error in Java - Rollbar
The cannot find symbol error refers to a situation where the Java compiler is unable to find the symbol associated with a given...
Read more >Fixing cannot find symbol in Java - YouTube
Common fixes for cannot find symbol in Java. This typically means a misspelling, variable or method that does not exist, or variable that...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ll publish a fix today
Thanks @ajitdas123 for the report, which version of Android do you have ? With which version of the android sdk do you compile ? We should maybe replace
FOREGROUND_SERVICE_TYPE_MICROPHONE
by128
as suggested by @Pauligrinder for sdk <= 29.