You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the ble-central plugin in a Capacitor application. After upgrading from 1.4.x. to latest 1.6.3 when building the app in Android Studio it complained about not being able to resolve androidx.annotation.RequiresPermission which was a result of a missing dependency implementation "androidx.annotation:annotation:1.1.0" in build.gradle. Adding the dep then made the project build successfully.
Problem was that whenever a Capacitor Update cli command was run the generated build.gradle would be overwritten. To solve the issue I hacked the following into plugin.xml for my installed version of the plugin which the Capacitor cli subsequently adds the dependency into build.gradle.
I'm guessing this is probably more of a Capacitor tooling issue as I'm not really sure how this would be handled in other frameworks that utilize ble-central. Wanted to at least document this for others that may come across this issue using the plugin.
The text was updated successfully, but these errors were encountered:
@sdunnin thanks for sharing! What version of capacitor are you working with? I might see if the above tweak has any ill-effects with any other configurations... it may be worth just doing, otherwise.
peitschie
changed the title
Problem with RequiresPermission dependency in Capacitor
Problem with RequiresPermission dependency in Capacitor 3
Mar 21, 2023
I'll close this as Capacitor 5 has just been released. If there's significant interest in this however, please re-open and I can have a look at addressing it.
I am using the ble-central plugin in a Capacitor application. After upgrading from 1.4.x. to latest 1.6.3 when building the app in Android Studio it complained about not being able to resolve
androidx.annotation.RequiresPermission
which was a result of a missing dependencyimplementation "androidx.annotation:annotation:1.1.0"
in build.gradle. Adding the dep then made the project build successfully.Problem was that whenever a Capacitor Update cli command was run the generated build.gradle would be overwritten. To solve the issue I hacked the following into
plugin.xml
for my installed version of the plugin which the Capacitor cli subsequently adds the dependency into build.gradle.I'm guessing this is probably more of a Capacitor tooling issue as I'm not really sure how this would be handled in other frameworks that utilize ble-central. Wanted to at least document this for others that may come across this issue using the plugin.
The text was updated successfully, but these errors were encountered: