์ค๋ช :
์ค๋ช ์์ ๋ฐ๋ผ react-native-onesignal์ ์ค์นํ์ต๋๋ค. iOS์์๋ ์ ์๋ํ์ง๋ง Google Play ์๋น์ค ์ข ์์ฑ๊ณผ ๊ด๋ จํ์ฌ Android ์ธก์์ ๋ฌธ์ ๊ฐ ๋ฐ์ํ๊ณ ์์ต๋๋ค. 4.2.0์์ 4.1.0์ผ๋ก google-services๋ก ๋ค์ด๊ทธ๋ ์ด๋ํ๋ฉด ์งํ๋๋ ๊ฒ ๊ฐ์ง๋ง ๋ถํํ๋ ๋ค์ด๊ทธ๋ ์ด๋ํ๋ฉด ๋ค๋ฅธ ์ฌ๋ฌ ์ข ์์ฑ์ด ์์๋ฉ๋๋ค.
๋๋ ์ด ๋ฌธ์ ๊ฐ ์๋๋ก์ด๋ ์ธก์ ๋ช ๊ณณ์์ ๊ธฐ๋ก๋๋ ๊ฒ์ ๋ณด์๊ณ , ์ด ๋ฐ์ ๋ค์ดํฐ๋ธ ๋ผ์ด๋ธ๋ฌ๋ฆฌ์์ ์ง์ํ๋ ์ต์ ๋ฒ์ ์ ์๋๋ก์ด๋ SDK์ ๋ฌธ์ ๊ฐ ์๋ค๊ณ ๋ฏฟ๊ฒ ํฉ๋๋ค.
https://github.com/OneSignal/OneSignal-Android-SDK/issues/894
https://stackoverflow.com/questions/59128152/error-in-project-app-a-resolved-google-play-services-library-dependency-depen
๋ด๊ฐ๋ฐ๋ ์ค๋ฅ๋ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
> In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[10.2.
1, 16.0.99]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.
Dependency failing: com.onesignal:OneSignal:3.12.3 -> com.google.android.gms:play-services-location@[10.2.1, 16.0.99], b
ut play-services-location version was 15.0.1.
The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
ifact with the issue.
-- Project 'app' depends onto com.google.android.gms:play-services-location@{strictly 15.0.1}
-- Project 'app' depends onto com.onesignal:OneSignal@{strictly 3.12.3}
-- Project 'app' depends on project 'react' which depends onto com.onesignal:[email protected]
ํ๊ฒฝ
๋ฌธ์ ์ฌํ ๋จ๊ณ:
buildscript {
...
repositories {
...
maven {
url 'https://plugins.gradle.org/m2/'
}
}
dependencies {
...
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.1, 0.99.99]'
classpath 'com.google.gms:google-services:4.2.0'
}
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
react-native run-android
๊ธฐํ:
๋๋์ด ๊ฐ์ ๋ฌธ์ ๊ฐ ๋ฐ์ํฉ๋๋ค.
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:preDebugBuild'.
> In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[10.2.
1, 16.0.99]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.
Dependency failing: com.onesignal:OneSignal:3.12.3 -> com.google.android.gms:play-services-location@[10.2.1, 16.0.99], b
ut play-services-location version was 16.0.0.
The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
ifact with the issue.
-- Project 'app' depends onto com.google.android.gms:play-services-location@{strictly 16.0.0}
-- Project 'app' depends onto com.onesignal:OneSignal@{strictly 3.12.3}
-- Project 'app' depends on project 'react' which depends onto com.onesignal:[email protected]
For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep
endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https://
github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your b
uild.gradle file.
* 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
BUILD FAILED in 15s
@Esirei ์ด๋ค ๋ฒ์ ์ react-native-onesignal์ ์ฌ์ฉํ๊ณ ์์ต๋๊น?
3.6.1์์ ๋์ผํ ๋ฌธ์ :
* What went wrong:
Could not determine the dependencies of task ':app:preDebugBuild'.
> In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[10.2.
1, 16.0.99]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.
Dependency failing: com.onesignal:OneSignal:3.12.4 -> com.google.android.gms:play-services-location@[10.2.1, 16.0.99], b
ut play-services-location version was 15.0.1.
The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
ifact with the issue.
-- Project 'app' depends onto com.google.android.gms:play-services-location@{strictly 15.0.1}
-- Project 'app' depends onto com.onesignal:OneSignal@{strictly 3.12.4}
-- Project 'app' depends on project 'react' which depends onto com.onesignal:[email protected]
For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep
endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https://
github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your b
uild.gradle file.
3.4.2๋ก ๋ค์ด๊ทธ๋ ์ด๋ํ๋ฉด ๋ฌธ์ ๊ฐ ํด๊ฒฐ๋ฉ๋๋ค.
์ต์ ๋ฒ์ ์ OneSignal Gradle ํ๋ฌ๊ทธ์ธ์ด ์๋์ง ํ์ธํด ์ฃผ์๊ฒ ์ต๋๊น?
@rgomezp OneSignal gradle ํ๋ฌ๊ทธ์ธ 3.12.4 ๋ฒ์ ์ด ํฌํจ๋ ์ต์ onesignal ๋ฒ์ ์ ์ค์นํด ๋ณด์์ต๋๋ค. ๊ทธ๋ฌ๋ ์ฌ์ ํ ์ค๋ฅ๊ฐ ๋ฐ์ํ์ต๋๋ค .
3.12.* Android SDK๊ฐ google-services 4.2์ ํธํ๋์ง ์๋ ๊ฒ์ผ๋ก ๋ณด์ ๋๋ค.
androidappbuild.gradle์์ google-services ์ ์ onesignal-gradle-plugin์ ์ ์ธํ์ญ์์ค.
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
apply plugin: 'com.google.gms.google-services'
@allumina ๊ฐ ์์์ ๋งํ๋ฏ์ด docs์ ๋ฐ๋ผ appbuild.gradle ํ์ผ์ ํธ์งํด์ผ ํฉ๋๋ค.
@Esirei ์ด๋ค ๋ฒ์ ์ react-native-onesignal์ ์ฌ์ฉํ๊ณ ์์ต๋๊น?
v3.6.1
์ด์ ์๋ gradle ํ์ผ ๋จ๊ณ์
์ด๊ฒ์ ํ์ฌ ํด๊ฒฐ๋ ๊ฒ ๊ฐ์ต๋๋ค. ๋ชจ๋์ ์ฐธ์ฌ ๊ฐ์ฌํฉ๋๋ค
@rgomezp ๋๋ ์ด๊ฒ์ด ์์ ๋์๋ค๊ณ ์๊ฐํ์ง ์์ต๋๋ค. ์ฌ๊ธฐ ์๋ ๋ชจ๋ ์ฌ๋๋ค์ ๋ค์ด๊ทธ๋ ์ด๋์ ๊ฐ์ ํด๊ฒฐ ๋ฐฉ๋ฒ์ ์ฐพ์์ต๋๋ค. ๋๋ ์ด๊ฒ์ด ์ฌ์ ํ ๋ง์ ๋ฌธ์ ๋ผ๊ณ ์๊ฐํฉ๋๋ค.
๋์์ด ๋์ง ์๋ "์ต์ ๋ฒ์ ์ ์ค์นํ๋์ง ํ์ธํ์ญ์์ค" ์ธ์ OneSignal์ ์๋ต์ด ํ์๋์ง ์์ต๋๋ค.
@rgomezp OneSignal gradle ํ๋ฌ๊ทธ์ธ 3.12.4 ๋ฒ์ ์ด ํฌํจ๋ ์ต์ onesignal ๋ฒ์ ์ ์ค์นํด ๋ณด์์ต๋๋ค. ๊ทธ๋ฌ๋ ์ฌ์ ํ ์ค๋ฅ๊ฐ ๋ฐ์ํ์ต๋๋ค .
3.12.* Android SDK๊ฐ google-services 4.2์ ํธํ๋์ง ์๋ ๊ฒ์ผ๋ก ๋ณด์ ๋๋ค.
@cmcaboy OneSignal Gradle ํ๋ฌ๊ทธ์ธ ์ OneSignal Android Native SDK ์ ๊ตฌ์ฑ ์์์ ๋
๋ฆฝ์ ์ด๋ฉฐ ์๋์ผ๋ก ํฌํจ๋์ง ์์ต๋๋ค.
React Native OneSignal ์ค์ ๊ฐ์ด๋ ์ Gradle ํ๋ฌ๊ทธ์ธ ์ถ๊ฐ ์น์
์ ์ฌ๋ฐ๋ฅด๊ฒ ๋ฐ๋๋์ง ๋ค์ ํ์ธํ์ธ์.
androidappbuild.gradle์์ google-services ์ ์ onesignal-gradle-plugin์ ์ ์ธํ์ญ์์ค.
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
apply plugin: 'com.google.gms.google-services'
๊ฐ์ฌํฉ๋๋ค.
app/build.gradle์์ ๋ค์ ์ค์ ์ถ๊ฐํ์ต๋๋ค.
ํ๋ฌ๊ทธ์ธ {
id 'com.onesignal.androidsdk.onesignal-gradle-plugin' ๋ฒ์ '0.12.6'
}
androidappbuild.gradle์์ google-services ์ ์ onesignal-gradle-plugin์ ์ ์ธํ์ญ์์ค.
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
apply plugin: 'com.google.gms.google-services'
@์๋ฃจ๋ฏธ๋
๋๋ฅผ ์ํด ์๋ํฉ๋๋ค. ๊ฐ์ฌ ํด์
ํ๋ฌ๊ทธ์ธ ์ ์ฉ: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
ํ๋ฌ๊ทธ์ธ ์ ์ฉ: 'com.google.gms.google-services'
@์๋ฃจ๋ฏธ๋
๋๋ฅผ ์ํด ์๋ํฉ๋๋ค. ๊ฐ์ฌํฉ๋๋ค โบ๏ธ ๐
์ฌ์ ํ ๋ฌธ์ ๊ฐ ๋ฐ์ํ๊ณ ์์ต๋๋ค. ์์ ์๋ฃจ์ ์ด ํจ๊ณผ๊ฐ ์์์ต๋๋ค. ๋๊ตฌ๋ ์ง ์์ ์ ์ ์ฒด gradle ํ์ผ์ ๊ณต์ ํ ์ ์์ต๋๊น?
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
androidappbuild.gradle์์ google-services ์ ์ onesignal-gradle-plugin์ ์ ์ธํ์ญ์์ค.
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
apply plugin: 'com.google.gms.google-services'