React-native-code-push: Could not resolve project :react-native-code-push. RN 0.62

Created on 31 Mar 2020  Â·  21Comments  Â·  Source: microsoft/react-native-code-push

Could not determine the dependencies of task ':app:compileDevDebugJavaWithJavac'.

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

Environment

  • react-native-code-push version: ^6.1.1
  • react-native version:0.62
  • iOS/Android/Windows version: 9
  • Does this reproduce on a debug build or release build? debug build
  • Does this reproduce on a simulator, or only on a physical device? physical device

(The more info the faster we will be able to address it!)

android

Most helpful comment

filepath 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 ':app', ':react-native-code-push'

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

build success

All 21 comments

Do you have these additional changes in your android/settings.gradle? Just replace include ':app' with those two lines.

https://github.com/microsoft/react-native-code-push/blob/master/docs/setup-android.md#plugin-installation-and-configuration-for-react-native-060-version-and-above-android

Same issues, follow the steps to install the documentation, and the same is true。

react-native-code-push version: ^6.2.0
react-native version:0.62
iOS/Android/Windows version: 9
Does this reproduce on a debug build or release build? debug build
Does this reproduce on a simulator, or only on a physical device? physical device

Same too

react-native-code-push version: ^6.2.0
react-native version:0.62
iOS/Android/Windows version: 9
Does this reproduce on a debug build or release build? debug build
Does this reproduce on a simulator, or only on a physical device? physical device

build in AppCenter failed too.

Here is an new fresh project. I tried to build with code-push, but it always failed.
https://github.com/tiendn/covid

filepath 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 ':app', ':react-native-code-push'

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

build success

That's amazing. You save my life @wencongsheng 💯
Thank you very much!

Thanks @wencongsheng ! It's worked for me!

Thanks @wencongsheng
I ended up doing something like this :

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

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

// Other dependencies //

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

i've fix this issue by only move code-push line into the bottom of all lines

I find fix the react-native to "0.61.5" is ok.

Yep, the order was the problem for me too.

i've fix this issue by only move code-push line into the bottom of all lines

u save my life, thanks.

Hi @ajiehatajie,
Thanks for reporting!

All steps for installing the latest version of the plugin are described in our documentation: https://github.com/microsoft/react-native-code-push/blob/master/docs/setup-android.md#android-setup

I'm going to close this issue for now. Please feel free to reopen it if you have any questions or issues.

@andreidubov I think there is a bit of confusion with the documentation.
I found

  1. Microsoft Docs
  2. Your link above
  3. Another setup in your docs.

I guess the most recent and correct one is number 3.

@pasine, yes you are right, I mistakenly sent the wrong link.

link to the setup documentation for android: https://github.com/microsoft/react-native-code-push/blob/master/docs/setup-android.md#android-setup

As for Microsoft Docs, we will update this soon, thanks.

i've fix this issue by only move code-push line into the bottom of all lines

Oh man... so magic! IT WORKS

filepath 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 ':app', ':react-native-code-push'

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

build success

work for me!
Thx!!!

Shouldn't autolinking take care of this?

i've fix this issue by only move code-push line into the bottom of all lines

Magic, thanks to save a day for me

thank you

filepath 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 ':app', ':react-native-code-push'

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

build success

Thank you!

filepath 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 ':app', ':react-native-code-push'

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

build success

Thanx

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sergey-akhalkov picture sergey-akhalkov  Â·  4Comments

kevando picture kevando  Â·  4Comments

ninjz picture ninjz  Â·  4Comments

Phredward picture Phredward  Â·  3Comments

chrisjrex picture chrisjrex  Â·  4Comments