рд╡рд┐рд╡рд░рдг:
рдбрд┐рдмрдЧ рд░рд┐рд▓реАрдЬ рдореЗрдВ рддреНрд░реБрдЯрд┐ рдЖ рд░рд╣реА рд╣реИ
рд╡рд╛рддрд╛рд╡рд░рдг
"рдкреНрд░рддрд┐рдХреНрд░рд┐рдпрд╛-рдореВрд▓-рдПрдХ рд╕рдВрдХреЗрдд": "^ 3.2.4"
рд╕реВрдд рдЬреЛрдбрд╝реЗрдВ
рдЖрд░рдПрди 0.55.4
рд╕рдорд╕реНрдпрд╛ рдХреЛ рдкреБрди: рдЙрддреНрдкрдиреНрди рдХрд░рдиреЗ рдХреЗ рд▓рд┐рдП рдХрджрдо:
react-native run-android
рдЪрд▓рд╛рдПрдВрдЖрдЙрдЯрдкреБрдЯ:
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all files for configuration ':app:debugCompileClasspath'.
> Could not find firebase-iid.aar (com.google.firebase:firebase-iid:12.0.1).
Searched in the following locations:
https://jcenter.bintray.com/com/google/firebase/firebase-iid/12.0.1/firebase-iid-12.0.1.aar
> Could not find firebase-common.aar (com.google.firebase:firebase-common:12.0.1).
Searched in the following locations:
https://jcenter.bintray.com/com/google/firebase/firebase-common/12.0.1/firebase-common-12.0.1.aar
> Could not find play-services-ads.aar (com.google.android.gms:play-services-ads:12.0.1).
Searched in the following locations:
https://jcenter.bintray.com/com/google/android/gms/play-services-ads/12.0.1/play-services-ads-12.0.1.aar
> Could not find firebase-auth-license.aar (com.google.firebase:firebase-auth-license:12.0.1).
Searched in the following locations:
https://jcenter.bintray.com/com/google/firebase/firebase-auth-license/12.0.1/firebase-auth-license-12.0.1.aar
android/build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenLocal()
jcenter()
google()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
}
}
рдРрдк/рдмрд┐рд▓реНрдб.рдЧреНрд░реЗрдбрд▓:
buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2/' } // Gradle Plugin Portal
}
dependencies {
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.10.0, 0.99.99]'
}
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
apply plugin: "com.android.application"
import com.android.build.OutputFile
project.ext.react = [
entryFile: "index.js"
]
apply from: "../../node_modules/react-native/react.gradle"
def enableSeparateBuildPerCPUArchitecture = false
/**
* Run Proguard to shrink the Java bytecode in release builds.
*/
def enableProguardInReleaseBuilds = false
android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
defaultConfig {
applicationId "com.realm"
minSdkVersion 16
targetSdkVersion 22
versionCode 1
versionName "1.0"
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86"
}
}
buildTypes {
release {
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
def versionCodes = ["armeabi-v7a":1, "x86":2]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
}
}
}
}
dependencies {
compile project(':react-native-onesignal')
implementation "com.google.firebase:firebase-core:12.0.1"
implementation "com.google.android.gms:play-services-base:12.0.1"
// RNFirebase optional dependencies
implementation "com.google.firebase:firebase-messaging:12.0.1"
implementation "com.google.firebase:firebase-iid:12.0.1"
compile project(':realm')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:26.0.2"
compile "com.facebook.react:react-native:+" // From node_modules
}
// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}
рдХреНрдпрд╛ рдХреЛрдИ рдЗрди рдореБрджреНрджреЛрдВ рдореЗрдВ рдореЗрд░реА рдорджрдж рдХрд░ рд╕рдХрддрд╛ рд╣реИ?
@rodrigofbm рдЕрдкрдиреЗ android/build.gradle
рдореЗрдВ рдЕрдкрдиреЗ repositories
рдЕрдиреБрднрд╛рдЧ рдореЗрдВ, google()
jcenter()
рдКрдкрд░ рд▓реЗ рдЬрд╛рдиреЗ рдХрд╛ рдкреНрд░рдпрд╛рд╕ рдХрд░реЗрдВред
рдпрд╣ рд╡рд┐рдЪрд┐рддреНрд░ рд╣реИ, рд▓реЗрдХрд┐рди рд╣рдордиреЗ рдЗрд╕реЗ рдЗрд╕ рд╡рд┐рд╢реЗрд╖ рд╕рдорд╕реНрдпрд╛ рдХреЛ рдареАрдХ рдХрд░рддреЗ рджреЗрдЦрд╛ рд╣реИред
@ Nightsd01 рдпреЛрдЧреНрдп рдпрд╣ рдХрд╛рдо рдХрд░рддрд╛ рд╣реИ! рдмрд╣реБрдд рдмрд╣реБрдд рдзрдиреНрдпрд╡рд╛рдж!
@ Nightsd01 рдмрд╣реБрдд рдмрд╣реБрдд рдзрдиреНрдпрд╡рд╛рдж!
рдореЗрд░реЗ рдЬреИрд╕реЗ рднреНрд░рдорд┐рдд рд╣реЛрдиреЗ рд╡рд╛рд▓реЗ рдЕрдиреНрдп рд▓реЛрдЧреЛрдВ рдХреЗ рд▓рд┐рдП рд╕реНрдкрд╖реНрдЯ рдХрд░рдиреЗ рдХреЗ рд▓рд┐рдП:
рдЖрдкрдХреЛ google()
рдФрд░ jcenter()
рдХреЛ allprojects.repositories
рд╕реЗрдХреНрд╢рди рдореЗрдВ рд╕реНрд╡реИрдк рдХрд░рдирд╛ рд╣реЛрдЧрд╛, рди рдХрд┐ buildscript.repositories
рд╕реЗрдХреНрд╢рди рдореЗрдВред
рдПрдлрд╡рд╛рдИрдЖрдИ рдХреЙрд░реНрдбреЛрд╡рд╛ рдФрд░ рдПрдВрдбреНрд░реЙрдЗрдб рдбреЗрд╡рд▓рдкрд░реНрд╕:
рдХрд▓ рд╣рдорд╛рд░реЗ рдмрд┐рд▓реНрдб рдкрд░ рднреА рдпрд╣реА рд╕рдорд╕реНрдпрд╛ рд╣реЛрдиреЗ рд▓рдЧреА рдФрд░ рд╣рдо рдЗрд╕реА рдЯреНрд░рд┐рдХ рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд░рдХреЗ рдмрд┐рд▓реНрдб рдХреЛ рдареАрдХ рдХрд░рдиреЗ рдореЗрдВ рдХрд╛рдордпрд╛рдм рд░рд╣реЗред рдзрдиреНрдпрд╡рд╛рдж!
рд╕рдорд╕реНрдпрд╛ рдХреЛ рдареАрдХ рдХрд░рдиреЗ рдХреЗ рд▓рд┐рдП, jcenter()
рдХреЛ allprojects.repositories.maven
ред
рд╕рдмрд╕реЗ рдЙрдкрдпреЛрдЧреА рдЯрд┐рдкреНрдкрдгреА
@rodrigofbm рдЕрдкрдиреЗ
android/build.gradle
рдореЗрдВ рдЕрдкрдиреЗrepositories
рдЕрдиреБрднрд╛рдЧ рдореЗрдВ,google()
jcenter()
рдКрдкрд░ рд▓реЗ рдЬрд╛рдиреЗ рдХрд╛ рдкреНрд░рдпрд╛рд╕ рдХрд░реЗрдВредрдпрд╣ рд╡рд┐рдЪрд┐рддреНрд░ рд╣реИ, рд▓реЗрдХрд┐рди рд╣рдордиреЗ рдЗрд╕реЗ рдЗрд╕ рд╡рд┐рд╢реЗрд╖ рд╕рдорд╕реНрдпрд╛ рдХреЛ рдареАрдХ рдХрд░рддреЗ рджреЗрдЦрд╛ рд╣реИред