Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to find a matching configuration of project :react-native-telephony: #18

Open
Makgora opened this issue Apr 28, 2020 · 3 comments

Comments

@Makgora
Copy link

Makgora commented Apr 28, 2020

Hi !

I just installed the lib using:

npm install --save react-native-telephony

Then I tried to build my app:

npm run android

And I get this error :

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not determine the dependencies of task ':app:preDebugBuild'.
    Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
    Could not resolve project :react-native-telephony.
    Required by:
    project :app
    Unable to find a matching configuration of project :react-native-telephony:
    - None of the consumable configurations have attributes.

I tried to link with

npm link react-native-telephony

I updtated settings.gradle file:

rootProject.name = 'app'

include ':react-native-telephony'
project(':react-native-telephony').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-telephony/android')

apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)

include ':app

I updtated build.gradle file:

implementation project(':react-native-telephony')

And MainApplication.java :

import com.telephony.TelephonyPackage;
...
@Override
        protected List<ReactPackage> getPackages() {
          @SuppressWarnings("UnnecessaryLocalVariable")
          List<ReactPackage> packages = new PackageList(this).getPackages();
          // Packages that cannot be autolinked yet can be added manually here, for example:
          // packages.add(new MyReactNativePackage());
            packages.add(new TelephonyPackage());
          return packages;
        }

What can I try ? Is this a problem someone already faced ?

@yusufdonmez
Copy link

npm install --save react-native-telephony
npx react-native run-android

  • What went wrong:
    Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.

Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
Could not resolve project :react-native-telephony.
Required by:
project :app
> Unable to find a matching configuration of project :react-native-telephony:
- None of the consumable configurations have attributes.

@ip883
Copy link

ip883 commented Aug 14, 2022

I know it's an old thread but to help ppl who are stuck with this:

In android/settings.gradle I added

include ':react-native-telephony'
project(':react-native-telephony').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-telephony/android/app')

right before

include ':app'

at the end of the file. That fixed the problem for me.

@Kayre-Scott-Primon
Copy link

Hi, i'm having the same problem, any suggestion to solve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants