petermetz / cordova-plugin-ibeacon

An iBeacon plugin for Phonegap / Cordova 3.x and upwards. Supports both iOS and Android (contributions are welcome)
Apache License 2.0
727 stars 372 forks source link

Dependency missing in build.gradle for org.altbeacon:android-beacon-library:2.16.1 #480

Open bha2020 opened 1 year ago

bha2020 commented 1 year ago

I am getting following error after android build and opening project in android studio Caused by: org.gradle.internal.metaobject.AbstractDynamicObject$CustomMessageMissingMethodException: Could not find method compile() for arguments [org.altbeacon:android-beacon-library:2.16.1] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

because there is no dependency available in build.gradle for implementation "org.altbeacon:android-beacon-library:2.16.1"

If I added this dependency manually then still this error exists

noahbaron commented 1 year ago

you need to replace "compile" with "implementation" since the compile() method is deprecated.

https://docs.gradle.org/6.9.4/userguide/java_plugin.html#sec:java_plugin_and_dependency_management

On Mon, May 1, 2023 at 11:17 PM Bhagyashri @.***> wrote:

I am getting following error after android build and opening project in android studio Caused by: org.gradle.internal.metaobject.AbstractDynamicObject$CustomMessageMissingMethodException: Could not find method compile() for arguments [org.altbeacon:android-beacon-library:2.16.1] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

because there is no dependency available in build.gradle for implementation "org.altbeacon:android-beacon-library:2.16.1"

If I added this dependency manually then still this error exists

— Reply to this email directly, view it on GitHub https://github.com/petermetz/cordova-plugin-ibeacon/issues/480, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQ3FBKDSM42SGABXNOPX5LXECRGPANCNFSM6AAAAAAXSTBOKA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

noahbaron commented 1 year ago

Also you need to change the android beacon library from 2.16.1 to 2.19.5 (or higher) for Android 12.

On Tue, May 2, 2023 at 4:49 PM Noah Baron @.***> wrote:

you need to replace "compile" with "implementation" since the compile() method is deprecated.

https://docs.gradle.org/6.9.4/userguide/java_plugin.html#sec:java_plugin_and_dependency_management

On Mon, May 1, 2023 at 11:17 PM Bhagyashri @.***> wrote:

I am getting following error after android build and opening project in android studio Caused by: org.gradle.internal.metaobject.AbstractDynamicObject$CustomMessageMissingMethodException: Could not find method compile() for arguments [org.altbeacon:android-beacon-library:2.16.1] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

because there is no dependency available in build.gradle for implementation "org.altbeacon:android-beacon-library:2.16.1"

If I added this dependency manually then still this error exists

— Reply to this email directly, view it on GitHub https://github.com/petermetz/cordova-plugin-ibeacon/issues/480, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQ3FBKDSM42SGABXNOPX5LXECRGPANCNFSM6AAAAAAXSTBOKA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

bha2020 commented 1 year ago

@noahbaron Thank you for the reply I have added implementation "org.altbeacon:android-beacon-library:2.19.5" this line in build.gradle file but still same error exists Screenshot 2023-05-03 160612

noahbaron commented 1 year ago

This repo has a pending pull request. So until that’s done you’ll need to do this manually:

https://github.com/petermetz/cordova-plugin-ibeacon/pull/477

Note the .gradle file to update is:

src/android/cordova-plugin-ibeacon.gradle

On Wed, May 3, 2023 at 3:40 AM Bhagyashri @.***> wrote:

@noahbaron https://github.com/noahbaron Thank you for the reply I have added implementation "org.altbeacon:android-beacon-library:2.19.5" this line in build.gradle file but still same error exists [image: Screenshot 2023-05-03 160612] https://user-images.githubusercontent.com/35487365/235894162-35904b2a-5041-4b7a-b574-de98a8935c6e.png

— Reply to this email directly, view it on GitHub https://github.com/petermetz/cordova-plugin-ibeacon/issues/480#issuecomment-1532804712, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQ3FBLV2WCP24EICKX4GRLXEIYY5ANCNFSM6AAAAAAXSTBOKA . You are receiving this because you were mentioned.Message ID: @.***>