MacKentoch / react-native-beacons-manager

React-Native library for detecting beacons (iOS and Android)
MIT License
582 stars 316 forks source link

A problem occurred evaluating project ':react-native-beacons-manager'. #260

Open gigflex opened 1 year ago

gigflex commented 1 year ago

Version 1.1.0

Platform Android

OS version Android 12

General versions react-native: 068.0 react: 17.0.2 beacon library: 1.1.0 pod. 1.11.3 npm: 9.2.0 node: 18.1.0 Steps to reproduce react-native init myTestApp --version=0.68.0 Add library version 1.1.0 ("react-native-beacons-manager": "git://github.com/MacKentoch/react-native-beacons-manager.git#53c1bda") cd ios && pod install add minimal example import React from 'react';

import {Text, View} from 'react-native';

import {Beacons} from 'react-native-beacons-manager';

const App = ({route, navigation}) => { Beacons.requestAlwaysAuthorization(); Beacons.allowsBackgroundLocationUpdates(true);

return (
    <View>
      <Text style={{color: 'white', top: 150}}>test</Text>
    </View>
);

};

export default App; Expected behavior The app should be started successfully

Actual behavior Build file '/Users/path/myTestApp/node_modules/react-native-beacons-manager/android/build.gradle' line: 108

A problem occurred evaluating project ':react-native-beacons-manager'.

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.

I have even created a minimal example. This is described above. But still I have the error. Does anyone know why?

sashko9807 commented 1 year ago

Already answered.

Reference: https://github.com/MacKentoch/react-native-beacons-manager/issues/244#issuecomment-1229186151