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

compatibility with react-native 0.62 #244

Closed
2 tasks done
tcodes0 opened this issue Mar 26, 2020 · 26 comments
Closed
2 tasks done

compatibility with react-native 0.62 #244

tcodes0 opened this issue Mar 26, 2020 · 26 comments

Comments

@tcodes0
Copy link

tcodes0 commented Mar 26, 2020

Bug Report

Before opening

  • Did you try the latest release?
  • Did you look for existing issues?

Ad Modules

yes

Platforms

yes

Versions

  • Android:
  • iOS:
  • react-native-fbads: latest
  • react-native: 0.62

Ads Environment

  • Facebook app installed:
  • Happens in test (dev build + device is marked as a test device): yes
  • Happens in production (release build + not a test device):
  • Facebook review status: [not submitted | approved]

Current Behaviour

after upgrading to react-native 0.62 I cant build android. Double checked everything and it seems correct. Could the auto linking files have changed?

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

Expected Behaviour

should build android

Steps to Reproduce

If you install the library on a fresh react-native 0.62 project it wont build (confirmed)
Additionals

@huynhvanquy
Copy link

You can run and show ads test or not?

@tcodes0
Copy link
Author

tcodes0 commented Apr 1, 2020

It doesn't build. I'll provide example repo to help

@andy-io
Copy link

andy-io commented Apr 1, 2020

i have the same issue as well

@hanjjang18
Copy link

i have save issue

@kirampark
Copy link

I have an issue as well

@apjinfosolution
Copy link

anyone find solution for this?

@ITLight
Copy link

ITLight commented May 2, 2020

i have same issue

@hussainarthuna
Copy link

I am having the same issue

@scaralfred
Copy link

I fixed this. Try to move these lines in => "android/settings.gradle" like this:

`rootProject.name = 'your_project_name'

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

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

build success

  • I just moved "apply from... " from the bottom to the top.

@hussainarthuna
Copy link

hussainarthuna commented May 9, 2020

I fixed this. Try to move these lines in => "android/settings.gradle" like this:

`rootProject.name = 'your_project_name'

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

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

build success

  • I just moved "apply from... " from the bottom to the top.

I tried, but it is not working. Thank you for your reply. Can you confirm the RN version?

@Jhonte
Copy link

Jhonte commented May 11, 2020

Same issue here as well, just upgraded to 0.62 :(

@Beyazatli
Copy link

I have that same problem.
I looked at all the issues in the repo, but I could not find a solution.
Any solution?

NodeJS: 10.20.1
NPM: 6.14.4

ReactNative FBSDK: ^1.1.1
ReactNative FBADS: ^6.3.1
React Native: ^0.62.0

OS: Windows 10, 1909

Output Screenshot: https://prnt.sc/sey9rj
Output Text:

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-fbads.
     Required by:
         project :app
      > Unable to find a matching configuration of project :react-native-fbads:
          - None of the consumable configurations have attributes.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BU�LD FAILED in 5s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

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-fbads.
     Required by:
         project :app
      > Unable to find a matching configuration of project :react-native-fbads:
          - None of the consumable configurations have attributes.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BU�LD FAILED in 5s

@Jhonte
Copy link

Jhonte commented May 12, 2020

No idea at all why, but changing the order and adding a / in the end of the path in settings.gradle seems to work for me.

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

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


@hussainarthuna
Copy link

No idea at all why, but changing the order and adding a / in the end of the path in settings.gradle seems to work for me.


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

include ':app'



include ':react-native-fbads'

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





I confirm as it is working perfectly now.
Thank you so much.

@tcodes0
Copy link
Author

tcodes0 commented May 21, 2020

Yeah pretty big issue still, will try the solution suggested but IMO it's not a fix, until some official doc/version bump. If this lib isn't getting proper attention & maintenance I'd migrate away from it

@kkusanagi
Copy link

So does this mean react-native-fbads still need react-native link react-native-fbads? As the linking is deprecated for RN 0.60+

@tcodes0
Copy link
Author

tcodes0 commented Jun 2, 2020

I don't know, luckily don't need to fix this right now

@aashish-choudhary
Copy link

So does this mean react-native-fbads still need react-native link react-native-fbads? As the linking is deprecated for RN 0.60+

Yes It is or you could just paste these lines at the end to settings.gradle

include ':react-native-fbads'

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

@huzaima1298
Copy link

i tried every solution but nothing helped. someone solved it

@huzaima1298
Copy link

Bug Report

Before opening

  • Did you try the latest release?
  • Did you look for existing issues?

Ad Modules

yes

Platforms

yes

Versions

  • Android:
  • iOS:
  • react-native-fbads: latest
  • react-native: 0.62

Ads Environment

  • Facebook app installed:
  • Happens in test (dev build + device is marked as a test device): yes
  • Happens in production (release build + not a test device):
  • Facebook review status: [not submitted | approved]

Current Behaviour

after upgrading to react-native 0.62 I cant build android. Double checked everything and it seems correct. Could the auto linking files have changed?

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

Expected Behaviour

should build android

Steps to Reproduce

If you install the library on a fresh react-native 0.62 project it wont build (confirmed)
Additionals

hey did something work for u?

@tcodes0
Copy link
Author

tcodes0 commented Jun 24, 2020

@huzaima1298 have not fixed it as I don't need to. Sorry I can't be of much help.

@serhangursoy
Copy link

For some reason on me react-native link react-native-fbads links to
'../node_modules/react-native-fbads/android/ not to '../node_modules/react-native-fbads/android/app/ which creates the main issue. Check the main path. Also changing order helped too

@neghani
Copy link

neghani commented Sep 12, 2020

No idea at all why, but changing the order and adding a / in the end of the path in settings.gradle seems to work for me.

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

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

The above solution work for me, I have no clue why is fixed at atll.

@akhzarna
Copy link

akhzarna commented Jan 1, 2021

Still fighting for this, tried all above solutions nothing worked for me.

I am MAC user

Can anybody help me or me should leave trying this

@akhzarna
Copy link

akhzarna commented Jan 1, 2021

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-fbads.
Required by:
project :app
> No matching configuration of project :react-native-fbads was found. The consumer was configured to find an API of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug' but:
- None of the consumable configurations have attributes.

can anyone help me ?

@thymikee
Copy link
Member

We've released v7 today. Please upgrade :)

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