Using insecure protocols with repositories on gradle. React Native - react-native

I'm upgrading the React Native version to the 0.69.3. And when I try to run on android. I get this error:
Using insecure protocols with repositories, without explicit opt-in, is unsupported. Switch Maven repository 'maven9(http://repo.brightcove.com/releases)' to redirect to a secure protocol (like HTTPS) or allow insecure protocols.
I tried the following solutions:
Add the allowInsecureProtocol = true param.
Just add the s on the http.
But still throw me this error.
This is my code in that part:
allprojects {
repositories {
mavenLocal()
maven {
url("$rootDir/../node_modules/react-native/android")
}
maven {
url("$rootDir/../node_modules/jsc-android/dist")
}
maven { url 'https://artifactory.img.ly/artifactory/imgly' }
mavenCentral {
content {
excludeGroup "com.facebook.react"
}
}
google()
jcenter()
maven { url 'https://repo.brightcove.com/releases' }
maven {
url "http://repo.brightcove.com/releases"
allowInsecureProtocol = true
}
maven { url 'https://maven.google.com' }
maven { url "https://www.jitpack.io" }
}
}

Related

Received status code 401 from server: Unauthorized react native mapbox

i am getting a authorization error when using mapbox in react native
https://api.mapbox.com/downloads/v1/navigation/android/maven/com/mapbox/navigation/ui/1.5.0/ui-1.5.0.pom'. Received status code 401 from server: Unauthorized
i am using the package ( https://www.npmjs.com/package/#homee/react-native-mapbox-navigation )
according package documentation i am doing the same.
my build.gradle file is
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
buildToolsVersion = "29.0.3"
minSdkVersion = 21
compileSdkVersion = 29
targetSdkVersion = 29
ndkVersion = "20.1.5948944"
}
repositories {
google()
jcenter()
maven {
url 'https://api.mapbox.com/downloads/v1/navigation/android/maven'
authentication {
basic(BasicAuthentication)
}
credentials {
username = "mapbox"
password = project.properties['MAPBOX_DOWNLOADS_TOKEN'] ?: ""
}
}
}
dependencies {
classpath("com.android.tools.build:gradle:4.1.0")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
google()
jcenter()
maven { url 'https://mapbox.bintray.com/mapbox' }
maven { url 'https://www.jitpack.io' }
maven {
url 'https://api.mapbox.com/downloads/v1/navigation/android/maven'
authentication {
basic(BasicAuthentication)
}
credentials {
username = "mapbox"
password = project.properties['MAPBOX_DOWNLOADS_TOKEN'] ?: ""
}
}
}
}
I recently encountered a similar issue. My first advice would be that if you're using their public Access token, create a new one from Access Tokens and make sure Downloads:Read scope is checked. Then create a gradle.properties file in "your_projects_directory.gradle" (which to me was C:\Users\USERNAME\AndroidStudioProjects\ .gradle), and paste the following line:
MAPBOX_DOWNLOADS_TOKEN=YOUR_SECRET_ACCESS_KEY
You should replace YOUR_SECRET_ACCESS_KEY with your actual access key of course. Just in case Android Studio is unable to find this newly created gradle.properties file, I would recommend adding a duplicate of the above line to your project gradle.properties file [This was what fixed my issue] although I'm not sure if this has any security implications.
Then finally your build.gradle should contain this:
maven {
url 'https://api.mapbox.com/downloads/v2/releases/maven'
authentication {
basic(BasicAuthentication)
}
credentials {
// Do not change the username below.
// This should always be `mapbox` (not your username).
username = 'mapbox'
// Use the secret token you stored in gradle.properties as the password
password = System.getenv("MAPBOX_DOWNLOADS_TOKEN") ?: project.property("MAPBOX_DOWNLOADS_TOKEN") as String
}
}

Kotlin Js file size is too big

I currently have a problem with the file size of kotlin js. I have one multiplatform lib which has around 160Kb and integrate it in the kotlin js project. The kotlin js project itself does not have that much code.
After assembling (which should enable also DCE for shrinking) the Js file size is up to 2.5MB. I really don't know why it bloats up like that. I hope anybody has a clue. Following is my gradle.config, maybe I forgot something to add.
Short update:
We found out when serving the file of 2.5MB from CDN githack. The file is optimized to 500KB. How is that even possible. Does that mean that the actual DCE of kotlin isn't working at all?
plugins {
kotlin("js") version "1.4.10"
}
group = "me.at"
version = "1.0-SNAPSHOT"
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven {
url = uri("https://dl.bintray.com/kotlin/kotlinx")
}
maven {
url = uri("https://dl.bintray.com/kotlin/kotlin-js-wrappers")
}
maven {
url = uri("https://dl.bintray.com/ekito/koin")
}
}
dependencies {
implementation(kotlin("stdlib-js"))
implementation("org.jetbrains:kotlin-styled:1.0.0-pre.110-kotlin-1.4.10")
implementation(npm("styled-components", "~5.1.1"))
implementation(npm("inline-style-prefixer", "~6.0.0"))
implementation("com.mp.multi:multi:1.1")
implementation("org.koin:koin-core:3.0.0-alpha-4")
implementation(npm("html-webpack-plugin", "3.2.0"))
}
kotlin {
js {
browser {
binaries.executable()
webpackTask {
cssSupport.enabled = true
}
runTask {
cssSupport.enabled = true
}
testTask {
useKarma {
useChromeHeadless()
webpackConfig.cssSupport.enabled = true
}
}
}
}
}

Swagger with Spring webflux dependency building issue

I work with kotlin gradle project. When i try to integrate swagger, it shows
Could not resolve io.springfox:springfox-swagger2:3.0.0-SNAPSHOT.
Possible solution:
- Declare repository providing the artifact, see the documentation at
error for
springfox-swagger2:3.0.0-SNAPSHOT
springfox-swagger-ui:3.0.0-SNAPSHOT
springfox-spring-webflux:3.0.0-SNAPSHOT
while reimport gradle projects.
buildscript {
ext {
kotlin_version = "1.2.51"
springBootVersion = "2.0.3.RELEASE"
junitPlatformVersion = '1.0.0-M2'
junitJupiterVersion = '5.0.0-M2'
junitVintageVersion = '4.12.0-M2'
smack_version = '4.2.3'
}
repositories {
mavenLocal()
mavenCentral()
maven { url "https://repo.spring.io/milestone" }
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/libs-snapshot" }
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "io.spring.gradle:dependency-management-plugin:1.0.3.RELEASE"
classpath("org.jetbrains.kotlin:kotlin-allopen:${kotlin_version}")
}
}
defaultTasks "clean", "build"
subprojects {
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'kotlin-spring'
sourceCompatibility = 1.8
repositories {
maven { url "https://repo.spring.io/libs-snapshot" }
mavenLocal()
mavenCentral()
maven { url "http://archiva.hsenidmobile.com/repository/internal" }
maven { url "https://repo.spring.io/milestone" }
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/libs-snapshot" }
maven { url 'http://oss.jfrog.org/artifactory/oss-snapshot-local/' }
jcenter()
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
compile("org.springframework.boot:spring-boot-starter-webflux:$springBootVersion") {
exclude(module: "hibernate-validator")
}
compile("org.springframework.boot:spring-boot-starter-data-jpa:$springBootVersion")
compile("org.springframework.boot:spring-boot-starter-security:$springBootVersion")
compile("javax.servlet:javax.servlet-api:3.0.1")
compile("io.jsonwebtoken:jjwt:0.7.0")
compile("hms.common:hms-common-util:1.0.9")
compile("com.fasterxml.jackson.module:jackson-module-kotlin:2.9.0.pr4")
compile("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.0.pr4")
compile("org.postgresql:postgresql:42.1.4")
compile("com.google.api-client:google-api-client:1.22.0")
compile group: 'org.springframework.plugin', name: 'spring-plugin-core', version: '2.0.0.RELEASE'
compile 'io.springfox:springfox-swagger2:3.0.0-SNAPSHOT'
compile 'io.springfox:springfox-swagger-ui:3.0.0-SNAPSHOT'
compile 'io.springfox:springfox-spring-webflux:3.0.0-SNAPSHOT'
implementation "org.igniterealtime.smack:smack-tcp:$smack_version"
implementation "org.igniterealtime.smack:smack-experimental:$smack_version"
implementation "org.igniterealtime.smack:smack-java7:$smack_version"
implementation "org.igniterealtime.smack:smack-extensions:$smack_version"
implementation "org.igniterealtime.smack:smack-im:$smack_version"
testCompile("org.junit.jupiter:junit-jupiter-api:${junitJupiterVersion}")
testCompile("org.junit.platform:junit-platform-runner:${junitPlatformVersion}")
testCompile("org.springframework.boot:spring-boot-starter-test:$springBootVersion")
testCompile("io.projectreactor:reactor-test:3.1.0.RELEASE")
runtime("tanukisoft:wrapper:3.2.3")
testRuntime("org.junit.jupiter:junit-jupiter-engine:${junitJupiterVersion}") //JUnit5
testRuntime("org.junit.vintage:junit-vintage-engine:${junitVintageVersion}") //JUnit4
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
}
add this repository
<repository>
<id>jcenter-snapshots</id>
<name>jcenter</name>
<url>http://oss.jfrog.org/artifactory/oss-snapshot-local/</url>
</repository>
it's maven syntax but you can easily translate it to gradle
Add this to your gradle build script root.
repositories {maven { url 'http://oss.jfrog.org/artifactory/oss-snapshot-local/' }}

When I run react-native cause a exception I don't know how to solve

I download the react-native project from git,and npm install node_models, then I run react-native run-android case an exception
I tried method such as add maven { URL "https://maven.google.com" } before
jcenter() but it still doesn't work
repositories {
// google()
maven { url "https://maven.google.com" } //react-native-video
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
maven { url "https://jitpack.io" } // used for MPAndroidChart
mavenLocal()
}
}
"* What went wrong:
A problem occurred configuring project ': app'.
> Could not resolve all dependencies for configuration ':app:_debugApk'.
> A problem occurred configuring project ':react-native-device-info'.
> Could not find common.jar (android.arch.core:common:1.0.0).
Searched in the following locations:
https://jcenter.bintray.com/android/arch/core/common/1.0.0/common-1.0.0.jar
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output."
then I tried to write code like this ,it works
allprojects {
repositories {
maven { url "https://jitpack.io" }
maven { url 'https://maven.google.com' }
mavenLocal()
// google()
jcenter()
maven { url "$rootDir/../node_modules/react-native/android" }
}
}
so, why have to write like this confues me.

fails to build an (newly created) ejected expo project

I am trying to add react-native-firebase to a newly created expo project, I ejected the app successfully, but when I try to add the library the project fails to build and I get the following error
ERROR: In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[15.0.
1]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.
Dependency failing: com.google.android.gms:play-services-flags:15.0.1 -> com.google.android.gms:play-services-basement#[
15.0.1], but play-services-basement version was 16.2.0.
I updated all firbase dependencies but it still fails, I then used this line to force stop the errors so I can at least build
com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true
the previous error is gone but I keep different errors. eg:
Error: Program type already present: com.google.android.gms.internal.measurement.zzbk
platform: Ubuntu 19:04
expo: Latest
react-native-firebase: 5.2.5
gradle (project) file
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
maven { url 'https://dl.bintray.com/android/android-tools/' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'
// classpath 'com.google.gms:google-services:3.2.1'
classpath 'de.undercouch:gradle-download-task:2.0.0'
classpath 'com.amazonaws:aws-devicefarm-gradle-plugin:1.3' // https://github.com/awslabs/aws-device-farm-gradle-plugin/releases
classpath 'com.google.gms:google-services:4.2.0'
}
}
allprojects {
repositories {
google()
jcenter()
// For non-detach
maven {
url "$rootDir/maven"
}
// For old expoviews to work
maven {
url "$rootDir/versioned-abis/expoview-abi26_0_0/maven"
}
maven {
url "$rootDir/versioned-abis/expoview-abi27_0_0/maven"
}
maven {
url "$rootDir/versioned-abis/expoview-abi28_0_0/maven"
}
maven {
url "$rootDir/versioned-abis/expoview-abi29_0_0/maven"
}
maven {
url "$rootDir/versioned-abis/expoview-abi30_0_0/maven"
}
maven {
url "$rootDir/versioned-abis/expoview-abi31_0_0/maven"
}
maven {
url "$rootDir/versioned-abis/expoview-abi32_0_0/maven"
}
// For detach
maven {
url "$rootDir/../node_modules/expokit/maven"
}
maven {
// We use a modified build of com.android.support.test:runner:1.0.1. Explanation in maven-test/README
url "$rootDir/maven-test"
}
maven {
// Local Maven repo containing AARs with JSC built for Android
url "$rootDir/../node_modules/jsc-android/dist"
}
flatDir {
dirs 'libs'
// dirs project(':expoview').file('libs')
}
// https://github.com/google/ExoPlayer/issues/5225#issuecomment-445739013
maven { url 'https://google.bintray.com/exoplayer' }
maven { url "https://jitpack.io" }
// Want this last so that we never end up with a stale cache
mavenLocal()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
gradle (app)
buildscript {
repositories {
google()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.26.1'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'devicefarm'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 27
defaultConfig {
applicationId 'expo.reactnative.test'
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName '1.0.0'
ndk {
abiFilters 'armeabi-v7a', 'x86'
}
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
// Deprecated. Used by net.openid:appauth
manifestPlaceholders = [
'appAuthRedirectScheme': 'host.exp.exponent'
]
}
dexOptions {
javaMaxHeapSize System.getenv("DISABLE_DEX_MAX_HEAP") ? null : "8g"
}
flavorDimensions 'remoteKernel'
productFlavors {
devKernel {
dimension 'remoteKernel'
}
prodKernel {
dimension 'remoteKernel'
}
}
signingConfigs {
debug {
storeFile file('../debug.keystore')
}
release {
storeFile file(System.getenv("ANDROID_KEYSTORE_PATH") ?: "release-key.jks")
storePassword System.getenv("ANDROID_KEYSTORE_PASSWORD")
keyAlias System.getenv("ANDROID_KEY_ALIAS")
keyPassword System.getenv("ANDROID_KEY_PASSWORD")
}
}
buildTypes {
debug {
debuggable true
ext.enableCrashlytics = false
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}
lintOptions {
abortOnError false
}
packagingOptions {
pickFirst "**"
}
configurations.all {
resolutionStrategy.force 'com.android.support:design:27.1.0'
}
}
devicefarm {
projectName System.getenv("DEVICEFARM_PROJECT_NAME")
devicePool System.getenv("DEVICEFARM_DEVICE_POOL")
executionTimeoutMinutes 40
authentication {
accessKey System.getenv("AWS_ACCESS_KEY_ID")
secretKey System.getenv("AWS_SECRET_ACCESS_KEY")
}
}
configurations.all {
resolutionStrategy {
force 'org.webkit:android-jsc:r224109'
}
}
// WHEN_PREPARING_SHELL_REMOVE_FROM_HERE
apply from: 'expo.gradle'
// WHEN_PREPARING_SHELL_REMOVE_TO_HERE
dependencies {
implementation project(':react-native-firebase')
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.google.firebase:firebase-core:16.0.9'
implementation 'com.google.firebase:firebase-analytics:16.5.0'
// Firebase dependencies
implementation "com.google.android.gms:play-services-base:16.1.0"
//
implementation 'com.android.support:multidex:1.0.1'
// Our dependencies
implementation 'com.android.support:appcompat-v7:27.1.1'
// Our dependencies from ExpoView
// DON'T ADD ANYTHING HERE THAT ISN'T IN EXPOVIEW. ONLY COPY THINGS FROM EXPOVIEW TO HERE.
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.facebook.android:facebook-android-sdk:4.37.0'
implementation('com.facebook.android:audience-network-sdk:4.99.0') {
exclude module: 'play-services-ads'
}
compileOnly 'org.glassfish:javax.annotation:3.1.1'
implementation 'com.jakewharton:butterknife:8.4.0'
implementation 'de.greenrobot:eventbus:2.4.0'
// Be careful when upgrading! Upgrading might break experience scoping. Check with Jesse. See Analytics.resetAmplitudeDatabaseHelper
implementation 'com.amplitude:android-sdk:2.9.2'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.google.android.gms:play-services-gcm:16.1.0'
implementation 'com.google.android.gms:play-services-analytics:16.0.8'
implementation 'com.google.android.gms:play-services-maps:16.1.0'
implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.android.gms:play-services-ads:17.2.0'
annotationProcessor 'com.raizlabs.android:DBFlow-Compiler:2.2.1'
implementation "com.raizlabs.android:DBFlow-Core:2.2.1"
implementation "com.raizlabs.android:DBFlow:2.2.1"
implementation "com.madgag.spongycastle:core:1.53.0.0"
implementation "com.madgag.spongycastle:prov:1.53.0.0"
debugImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta1'
// debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.4-beta1'
releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta1'
implementation 'com.facebook.device.yearclass:yearclass:2.1.0'
implementation 'commons-io:commons-io:1.4'
implementation 'me.leolin:ShortcutBadger:1.1.4#aar'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0'
implementation 'com.yqritc:android-scalablevideoview:1.0.1'
implementation 'commons-codec:commons-codec:1.10'
implementation 'com.segment.analytics.android:analytics:4.3.0'
implementation 'com.google.zxing:core:3.3.3'
implementation 'net.openid:appauth:0.4.1'
implementation('com.airbnb.android:lottie:2.5.5') {
exclude group: 'com.android.support', module: 'appcompat-v7'
}
implementation('io.nlopez.smartlocation:library:3.2.11') {
transitive = false
}
implementation 'com.android.support:exifinterface:27.1.1'
implementation 'com.squareup.okio:okio:1.9.0'
implementation 'com.facebook.soloader:soloader:0.5.1'
implementation 'com.google.android.exoplayer:exoplayer:2.6.1'
implementation 'expolib_v1.com.google.android.exoplayer:expolib_v1-extension-okhttp:2.6.1#aar'
// expo-file-system
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
implementation 'com.squareup.okhttp3:okhttp-urlconnection:3.10.0'
// Testing
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
// We use a modified build of com.android.support.test:runner:1.0.1. Explanation in maven-test/README
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support:support-annotations:27.1.1'
androidTestImplementation 'com.google.code.findbugs:jsr305:3.0.0'
androidTestImplementation 'com.android.support.test.uiautomator:uiautomator-v18:2.1.1'
androidTestImplementation 'com.azimolabs.conditionwatcher:conditionwatcher:0.2'
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:1.10.19'
testImplementation 'org.robolectric:robolectric:3.8'
testImplementation 'com.android.support.test:runner:1.0.2-alpha1'
testImplementation 'com.android.support.test:rules:1.0.2-alpha1'
implementation('host.exp.exponent:expoview:32.0.0#aar') {
transitive = true
exclude group: 'com.squareup.okhttp3', module: 'okhttp'
exclude group: 'com.squareup.okhttp3', module: 'okhttp-urlconnection'
}
api 'com.facebook.react:react-native:32.0.0'
api 'host.exp.exponent:expo-app-loader-provider:1.0.0'
api 'host.exp.exponent:expo-core:2.0.0'
api 'host.exp.exponent:expo-constants-interface:2.0.0'
api 'host.exp.exponent:expo-constants:2.0.1'
api 'host.exp.exponent:expo-errors:1.0.0'
api 'host.exp.exponent:expo-file-system-interface:2.0.0'
api 'host.exp.exponent:expo-file-system:2.0.0'
api 'host.exp.exponent:expo-image-loader-interface:2.0.0'
api 'host.exp.exponent:expo-permissions:2.0.0'
api 'host.exp.exponent:expo-permissions-interface:2.0.0'
api 'host.exp.exponent:expo-sensors-interface:2.0.0'
api 'host.exp.exponent:expo-react-native-adapter:2.0.0'
api 'host.exp.exponent:expo-task-manager:1.0.0'
api 'host.exp.exponent:expo-task-manager-interface:1.0.0'
// Optional universal modules, could be removed
// along with references in MainActivity
api 'host.exp.exponent:expo-ads-admob:2.0.0'
api 'host.exp.exponent:expo-app-auth:2.0.0'
api 'host.exp.exponent:expo-analytics-segment:2.0.0'
api 'host.exp.exponent:expo-barcode-scanner-interface:2.0.0'
api 'host.exp.exponent:expo-barcode-scanner:2.0.0'
api 'host.exp.exponent:expo-camera-interface:2.0.0'
api 'host.exp.exponent:expo-camera:2.0.0'
api 'host.exp.exponent:expo-contacts:2.0.0'
api 'host.exp.exponent:expo-face-detector:2.0.0'
api 'host.exp.exponent:expo-face-detector-interface:2.0.0'
api 'host.exp.exponent:expo-font:2.0.0'
api 'host.exp.exponent:expo-gl-cpp:2.0.0'
api 'host.exp.exponent:expo-gl:2.0.0'
api 'host.exp.exponent:expo-google-sign-in:2.0.0'
api 'host.exp.exponent:expo-local-authentication:2.0.0'
api 'host.exp.exponent:expo-localization:2.0.0'
api 'host.exp.exponent:expo-location:2.0.1'
api 'host.exp.exponent:expo-media-library:2.0.0'
api 'host.exp.exponent:expo-print:2.0.0'
api 'host.exp.exponent:expo-sensors:2.0.0'
api 'host.exp.exponent:expo-sms:2.0.0'
api 'host.exp.exponent:expo-background-fetch:1.0.0'
}
// This has to be down here for some reason
apply plugin: 'com.google.gms.google-services'
}
// This has to be down here for some reason
apply plugin: 'com.google.gms.google-services'
com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true
Add
maven { // expo-camera bundles a custom
com.google.android:cameraview url
"$rootDir/../node_modules/expo-camera/android/maven" }
to build.gradle at
allprojects {
repositories {
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
maven { // expo-camera bundles a custom com.google.android:cameraview url
"$rootDir/../node_modules/expo-camera/android/maven" }
google()
jcenter()
maven { url 'https://jitpack.io' }
} }
This works for me.
maven { // expo-camera bundles a custom
url("$rootDir/../node_modules/expo-camera/android/maven")
}