-
-
Notifications
You must be signed in to change notification settings - Fork 666
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[Bug]: Missing permissions required by NotificationManagerCompat.notify #1393
Comments
Dear @Huber1, Do you still have this issue? I cannot reproduce this. Kind regards, Tim |
Hi Tim, |
I'll close this for now, don't get this error ATM. |
Error: Missing permissions required by NotificationManagerCompat.notify: android.permission.POST_NOTIFICATIONS [MissingPermission] Explanation for issues of type "MissingPermission": |
how can i solve this ? |
Any updates on this? I'm running into the same problem as OP |
This is not a final solution, but for the moment works to me: /android/build.gradle --->
// I think this is specific config only for the packages that I'm using
/android/app/build.gradle --->
/settings.gradle --->
I hope that works to you, It is a solution in the meantime |
Can you reopen this issue? I'm facing this issue.
Version:
|
I am also facing this issue in version 4.6.1 |
same issue |
@TimHoogstrate I believe this PR fixes it.. can you merge it in?? |
i reopened this now, because others still have the problem |
Please check the following before submitting a new issue.
Please select affected platform(s)
Steps to reproduce
./gradlew clean
./gradlew build
Expected results
App builds normally
Actual results
/home/moritz/.pub-cache/hosted/pub.dev/geolocator_android-4.4.0/android/src/main/java/com/baseflow/geolocator/location/BackgroundNotification.java:100: Error: Missing permissions required by NotificationManagerCompat.notify: android.permission.POST_NOTIFICATIONS [MissingPermission]
notificationManager.notify(notificationId, builder.build());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Explanation for issues of type "MissingPermission":
This check scans through your code and libraries and looks at the APIs
being used, and checks this against the set of permissions required to
access those APIs. If the code using those APIs is called at runtime, then
the program will crash.
Furthermore, for permissions that are revocable (with targetSdkVersion 23),
client code must also be prepared to handle the calls throwing an exception
if the user rejects the request for permission at runtime.
The full lint text report is located at:
/home/moritz/IdeaProjects/better_hm/build/geolocator_android/intermediates/lint_intermediate_text_report/debug/lint-results-debug.txt
FAILURE: Build failed with an exception.
Execution failed for task ':geolocator_android:lintDebug'.
/home/moritz/.pub-cache/hosted/pub.dev/geolocator_android-4.4.0/android/src/main/java/com/baseflow/geolocator/location/BackgroundNotification.java:100: Error: Missing permissions required by NotificationManagerCompat.notify: android.permission.POST_NOTIFICATIONS [MissingPermission]
notificationManager.notify(notificationId, builder.build());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The full lint text report is located at:
/home/moritz/IdeaProjects/better_hm/build/geolocator_android/intermediates/lint_intermediate_text_report/debug/lint-results-debug.txt
lint-results-debug.txt
Code sample
Not necessary
Screenshots or video
No response
Version
10.1.0 --> geolocator_android: 4.4.0
Flutter Doctor output
[✓] Flutter (Channel stable, 3.16.2, on openSUSE Tumbleweed 6.6.2-1-default, locale en_US.UTF-8)
• Flutter version 3.16.2 on channel stable at /usr/local/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 9e1c857886 (6 days ago), 2023-11-30 11:51:18 -0600
• Engine revision cf7a9d0800
• Dart version 3.2.2
• DevTools version 2.28.3
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
• Android SDK at /home/moritz/Android/Sdk
• Platform android-33, build-tools 33.0.2
• Java binary at: /home/moritz/.local/share/JetBrains/Toolbox/apps/android-studio/jbr/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
• All Android licenses accepted.
[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Linux toolchain - develop for Linux desktop
• clang version 17.0.5
• cmake version 3.27.7
• ninja version 1.11.1
• pkg-config version 1.8.0
[✓] Android Studio (version 2023.1)
• Android Studio at /home/moritz/.local/share/JetBrains/Toolbox/apps/android-studio
• Flutter plugin version 76.3.3
• Dart plugin version 222.4582
• Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
[✓] IntelliJ IDEA Ultimate Edition (version 2023.2)
• IntelliJ at /home/moritz/.local/share/JetBrains/Toolbox/apps/intellij-idea-ultimate
• Flutter plugin version 76.3.4
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
[✓] VS Code (version 1.84.0)
• VS Code at /usr/share/code
• Flutter extension can be installed from:
🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[✓] Connected device (1 available)
• Linux (desktop) • linux • linux-x64 • openSUSE Tumbleweed 6.6.2-1-default
[✓] Network resources
• All expected network resources are available.
! Doctor found issues in 1 category.
The text was updated successfully, but these errors were encountered: