microsoft / react-native-code-push

React Native module for CodePush
http://appcenter.ms
Other
8.98k stars 1.47k forks source link

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

Closed ajiehatajie closed 4 years ago

ajiehatajie commented 4 years ago

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

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

PaitoAnderson commented 4 years ago

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

dntzee commented 4 years ago

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

tiendn commented 4 years ago

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.

tiendn commented 4 years ago

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

wencongsheng commented 4 years ago

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

tiendn commented 4 years ago

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

ashlyWeiting commented 4 years ago

Thanks @wencongsheng ! It's worked for me!

ancyrweb commented 4 years ago

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')
trickyc0d3r commented 4 years ago

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

iosLongFeng commented 4 years ago

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

lucasfronza commented 4 years ago

Yep, the order was the problem for me too.

chenyu1990 commented 4 years ago

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

u save my life, thanks.

andreidubov commented 4 years ago

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.

pasine commented 4 years ago

@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.

andreidubov commented 4 years ago

@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.

TonnyRogers commented 4 years ago

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

Oh man... so magic! IT WORKS

WGwangguan commented 4 years ago

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!!!

DavideValdo commented 4 years ago

Shouldn't autolinking take care of this?

chellongCoder commented 3 years ago

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

nyowusu commented 3 years ago

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!

cesarAugusto1994 commented 3 years ago

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

lavisar commented 1 month ago

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

I have same problem with react native 0.75.X and this solved my problem. Thank you so much!