Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not get unknown property 'mergeResourcesProvider' for object of type com.android.build.gradle.internal.api.ApplicationVariantImpl. #4757

Closed
hadnet opened this issue Feb 19, 2019 · 42 comments

Comments

@hadnet
Copy link

hadnet commented Feb 19, 2019

Issue Description

Got this error just when I try to build for Android (on iOS is working fine):

FAILURE: Build failed with an exception.

  • Where:
    Script '/Users/jon/RN/RNNv2Firebase/node_modules/react-native/react.gradle' line: 95

  • What went wrong:
    A problem occurred configuring project ':app'.

Could not get unknown property 'mergeResourcesProvider' for object of type com.android.build.gradle.internal.api.ApplicationVariantImpl.

Steps to Reproduce

  1. react-native init Project
  2. yarn add react-native-navigation

Environment

  • React Native Navigation version: 2.12.0
  • React Native version: 0.59.0-rc.2
  • Platform: Android
  • Device info: Nexus5X API28 x86
@ralexand56
Copy link

I'm getting the same error.

@tibbus
Copy link

tibbus commented Feb 27, 2019

same here, happens when I try to upgrade my app to React Native version: 0.59.0-rc.2 , cannot reproduce with a new/clean project.

@kimbui87
Copy link

I'm using 0.59.0-rc.3

and solved by these steps:

  • In gradle-wrapper.properties
    change distributionUrl to distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
  • and in root build.gradle file change gradle classpath to this: classpath 'com.android.tools.build:gradle:3.3.0'
  • Copy file 'metro.config.js' in 0.59-stable/template to your project.
  • Remove node_modules, yarn install, and run-android again.
    (And make sure version of metro in package.json "metro-react-native-babel-preset": "0.51.0" is the same with current metro's version)

@hadnet hadnet closed this as completed Feb 28, 2019
@tibbus
Copy link

tibbus commented Feb 28, 2019

for me rc3 didn't solved the issue, but @kimbui87 solution did !

@linmiss
Copy link

linmiss commented Mar 13, 2019

I'm using 0.59.0-rc.3

and solved by these steps:

  • In gradle-wrapper.properties
    change distributionUrl to distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
  • and in root build.gradle file change gradle classpath to this: classpath 'com.android.tools.build:gradle:3.3.0'
  • Copy file 'metro.config.js' in 0.59-stable/template to your project.
  • Remove node_modules, yarn install, and run-android again.
    (And make sure version of metro in package.json "metro-react-native-babel-preset": "0.51.0" is the same with current metro's version)

i had solved it in Android, thanks

@vikaskbh
Copy link

@kimbui87 solution worked on RN-0.59.1

@ctrljs
Copy link

ctrljs commented Mar 15, 2019

I'm using 0.59.0-rc.3

and solved by these steps:

  • In gradle-wrapper.properties
    change distributionUrl to distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
  • and in root build.gradle file change gradle classpath to this: classpath 'com.android.tools.build:gradle:3.3.0'
  • Copy file 'metro.config.js' in 0.59-stable/template to your project.
  • Remove node_modules, yarn install, and run-android again.
    (And make sure version of metro in package.json "metro-react-native-babel-preset": "0.51.0" is the same with current metro's version)

where do i paste the metro.config.js file ?? in which folder?

@marcelloJr
Copy link

I'm using 0.59.0-rc.3

and solved by these steps:

  • In gradle-wrapper.properties
    change distributionUrl to distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
  • and in root build.gradle file change gradle classpath to this: classpath 'com.android.tools.build:gradle:3.3.0'
  • Copy file 'metro.config.js' in 0.59-stable/template to your project.
  • Remove node_modules, yarn install, and run-android again.
    (And make sure version of metro in package.json "metro-react-native-babel-preset": "0.51.0" is the same with current metro's version)

Worked on react-native-cli: 2.0.1 and react-native: 0.59.1. Thanks bro

I didn't need to modify the file metro.config.js'

@theilgaz
Copy link

I'm using 0.59.0-rc.3

and solved by these steps:

  • In gradle-wrapper.properties
    change distributionUrl to distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
  • and in root build.gradle file change gradle classpath to this: classpath 'com.android.tools.build:gradle:3.3.0'
  • Copy file 'metro.config.js' in 0.59-stable/template to your project.
  • Remove node_modules, yarn install, and run-android again.
    (And make sure version of metro in package.json "metro-react-native-babel-preset": "0.51.0" is the same with current metro's version)

Tried on react-native-cli: 2.0.1 and react-native: 0.59.1.
Gradle version: 4.10.1

It didn't work.

Task :react-native-maps:compileDebugRenderscript FAILED
Could not resolve all files for configuration ':react-native-maps:debugCompileClasspath'.
Could not resolve com.android.support:support-compat:25.2.0.
Could not resolve com.android.support:support-annotations:25.2.0.
Could not resolve com.android.support:support-core-utils:25.2.0.
Could not resolve com.android.support:support-fragment:25.2.0.
Could not resolve com.android.support:support-annotations:28.0.0.
Could not resolve com.android.support:support-compat:28.0.0.
Could not resolve com.android.support:support-core-utils:28.0.0.
Could not resolve com.android.support:support-fragment:28.0.0.
Could not resolve com.android.support:support-core-ui:28.0.0.
Could not resolve com.android.support:support-compat:25.2.0.
Could not resolve com.android.support:support-core-utils:25.2.0.
Could not resolve com.android.support:support-core-ui:25.2.0.
Could not resolve com.android.support:support-fragment:25.2.0.
Could not resolve com.android.support:support-annotations:26.1.0.
Could not resolve com.android.support:support-annotations:25.2.0.

BUILD FAILED in 1s
8 actionable tasks: 3 executed, 5 up-to-date
error Command failed: gradlew.bat app:installDebug

@jeronnex2
Copy link

having the same error now ....rn 0.59.1

flsilva added a commit to reflex-ui/reflex-ui that referenced this issue Mar 21, 2019
flsilva added a commit to reflex-ui/reflex-ui that referenced this issue Mar 21, 2019
@kunal886496
Copy link

Same Problem.

@kunal886496
Copy link

THIS HAPPENS :

Loading dependency graph, done.
Error: Unable to resolve module ./index from /Users/c-kunal.chugh/Desktop/bizmanager-react/node_modules/react-native/.: The module ./index could not be found from /Users/c-kunal.chugh/Desktop/bizmanager-react/node_modules/react-native/.. Indeed, none of these files exist:

  • /Users/c-kunal.chugh/Desktop/bizmanager-react/node_modules/react-native/index(.native||.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
  • /Users/c-kunal.chugh/Desktop/bizmanager-react/node_modules/react-native/index/index(.native||.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
    at ModuleResolver.resolveDependency (/Users/c-kunal.chugh/Desktop/bizmanager-react/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:163:15)
    at ResolutionRequest.resolveDependency (/Users/c-kunal.chugh/Desktop/bizmanager-react/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:52:18)
    at DependencyGraph.resolveDependency (/Users/c-kunal.chugh/Desktop/bizmanager-react/node_modules/metro/src/node-haste/DependencyGraph.js:283:16)
    at /Users/c-kunal.chugh/Desktop/bizmanager-react/node_modules/metro/src/lib/transformHelpers.js:261:42
    at Server. (/Users/c-kunal.chugh/Desktop/bizmanager-react/node_modules/metro/src/Server.js:1038:41)
    at Generator.next ()
    at asyncGeneratorStep (/Users/c-kunal.chugh/Desktop/bizmanager-react/node_modules/metro/src/Server.js:99:24)
    at _next (/Users/c-kunal.chugh/Desktop/bizmanager-react/node_modules/metro/src/Server.js:119:9)
    ::ffff:127.0.0.1 - - [22/Mar/2019:11:02:23 +0000] "GET /index.delta?platform=android&dev=true&minify=false HTTP/1.1" 500 - "-" "okhttp/3.12.1"

@ras-marques
Copy link

Same error as @kunal886496

alemor10 added a commit to CSCI-150-Lab2-Team13/Palmanac that referenced this issue Mar 23, 2019
@hoscahmet
Copy link

hoscahmet commented Mar 24, 2019

don't use run npm audit fix to fix them, or npm audit for details in your project. just npm install

@859988748
Copy link

I have the same issue. Updating gradle to 3.3.0 did address this issue. But gradle 3.3.0 has a bug. It can not resolve R file in my project. all of my layout file can not be resolved. I have to downgrade gradle to 3.2.1. But, this issue will happen again. How to fix this?

@kimbui87
Copy link

I'm using 0.59.0-rc.3
and solved by these steps:

  • In gradle-wrapper.properties
    change distributionUrl to distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
  • and in root build.gradle file change gradle classpath to this: classpath 'com.android.tools.build:gradle:3.3.0'
  • Copy file 'metro.config.js' in 0.59-stable/template to your project.
  • Remove node_modules, yarn install, and run-android again.
    (And make sure version of metro in package.json "metro-react-native-babel-preset": "0.51.0" is the same with current metro's version)

where do i paste the metro.config.js file ?? in which folder?

You should put it in root - same level with App.js. But now RN 0.59 official version was release, it seems no need config metro anymore.

@iKronyck
Copy link

Thanks @kimbui87 working for me

@cliff-km
Copy link

cliff-km commented Mar 30, 2019

I have the same issue as @859988748. I'm using react-native-maps and facing a similar build issue where the apparent working solution is to downgrade gradle to 3.2.1.

Here's a link to that issue: react-native-maps/react-native-maps#2696

@859988748
Copy link

@CliffWMiller I solved it. You need to upgrade AS to 3.2.2 also. using the latest AS will work good with gradle 3.3.0. It cost me one day.

@nuclearWinters
Copy link

@CliffWMiller I solved it. You need to upgrade AS to 3.2.2 also. using the latest AS will work good with gradle 3.3.0. It cost me one day.

@859988748 Can you tell me what "AS" stands for? Thank you

@swcisel
Copy link

swcisel commented Apr 2, 2019

@859988748 Can you tell me what "AS" stands for? Thank you

Android Studio

@MarcoLLeite
Copy link

I'm using 0.59.0-rc.3

and solved by these steps:

  • In gradle-wrapper.properties
    change distributionUrl to distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
  • and in root build.gradle file change gradle classpath to this: classpath 'com.android.tools.build:gradle:3.3.0'
  • Copy file 'metro.config.js' in 0.59-stable/template to your project.
  • Remove node_modules, yarn install, and run-android again.
    (And make sure version of metro in package.json "metro-react-native-babel-preset": "0.51.0" is the same with current metro's version)

This not only helped me with using the latest version, but t also helped getting the vscode-react debugger back hitting breakpoints

@dmackinn
Copy link

dmackinn commented Apr 3, 2019

@kimbui87 Thank you, your solution fixed this issue for me when upgrading from 0.57.4 to 0.59.3

@ManuelAlanis
Copy link

I'm using 0.59.0-rc.3
and solved by these steps:

  • In gradle-wrapper.properties
    change distributionUrl to distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
  • and in root build.gradle file change gradle classpath to this: classpath 'com.android.tools.build:gradle:3.3.0'
  • Copy file 'metro.config.js' in 0.59-stable/template to your project.
  • Remove node_modules, yarn install, and run-android again.
    (And make sure version of metro in package.json "metro-react-native-babel-preset": "0.51.0" is the same with current metro's version)

where do i paste the metro.config.js file ?? in which folder?

Thanks @kimbui87 it's works for me

@vigneshsankar07
Copy link

I'm using 0.59.0-rc.3

and solved by these steps:

  • In gradle-wrapper.properties
    change distributionUrl to distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
  • and in root build.gradle file change gradle classpath to this: classpath 'com.android.tools.build:gradle:3.3.0'
  • Copy file 'metro.config.js' in 0.59-stable/template to your project.
  • Remove node_modules, yarn install, and run-android again.
    (And make sure version of metro in package.json "metro-react-native-babel-preset": "0.51.0" is the same with current metro's version)

Thanks, @kimbui87 It's Works fine for me.

@hariputranto
Copy link

I'm using 0.59.0-rc.3

and solved by these steps:

  • In gradle-wrapper.properties
    change distributionUrl to distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
  • and in root build.gradle file change gradle classpath to this: classpath 'com.android.tools.build:gradle:3.3.0'
  • Copy file 'metro.config.js' in 0.59-stable/template to your project.
  • Remove node_modules, yarn install, and run-android again.
    (And make sure version of metro in package.json "metro-react-native-babel-preset": "0.51.0" is the same with current metro's version)

what does it mean by removing node?

@kimbui87
Copy link

kimbui87 commented Apr 5, 2019

I'm using 0.59.0-rc.3
and solved by these steps:

  • In gradle-wrapper.properties
    change distributionUrl to distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
  • and in root build.gradle file change gradle classpath to this: classpath 'com.android.tools.build:gradle:3.3.0'
  • Copy file 'metro.config.js' in 0.59-stable/template to your project.
  • Remove node_modules, yarn install, and run-android again.
    (And make sure version of metro in package.json "metro-react-native-babel-preset": "0.51.0" is the same with current metro's version)

what does it mean by removing node?

delete old node_modules, yarn install again to make sure new config above is applied

@mohshbool
Copy link

mohshbool commented Apr 10, 2019

I did what @kimbui87 suggested, not the build is successful but the app keeps stopping (crashing), I'm using version 0.59.4. Does anybody know the solution to this? Thanks in anticipation

@wibav
Copy link

wibav commented Apr 11, 2019

I did what @kimbui87 suggested, not the build is successful but the app keeps stopping (crashing), I'm using version 0.59.4. Does anybody know the solution to this? Thanks in anticipation

i solved my problem using this npm install — save “react-native-maps@jerolimov/react-native-maps#fix-rn59rc-compile-issues”

from: react-native-maps/react-native-maps#2702

the problem is with React native 0.59+ that compile with compileSdkVersion 28 and maps use 26

@hakiimmislam
Copy link

I'm using 0.59.0-rc.3

and solved by these steps:

  • In gradle-wrapper.properties
    change distributionUrl to distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
  • and in root build.gradle file change gradle classpath to this: classpath 'com.android.tools.build:gradle:3.3.0'
  • Copy file 'metro.config.js' in 0.59-stable/template to your project.
  • Remove node_modules, yarn install, and run-android again.
    (And make sure version of metro in package.json "metro-react-native-babel-preset": "0.51.0" is the same with current metro's version)

This solved the issue. Thank you so much!

@LukePenkava
Copy link

I'm using 0.59.0-rc.3

and solved by these steps:

  • In gradle-wrapper.properties
    change distributionUrl to distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
  • and in root build.gradle file change gradle classpath to this: classpath 'com.android.tools.build:gradle:3.3.0'
  • Copy file 'metro.config.js' in 0.59-stable/template to your project.
  • Remove node_modules, yarn install, and run-android again.
    (And make sure version of metro in package.json "metro-react-native-babel-preset": "0.51.0" is the same with current metro's version)

Hi, i tried this fix, but when i do that, i get this error:

Cannot find a version of 'com.android.support:support-compat' that satisfies the version constraints: 
   Dependency path 'MyProject-native-maps:unspecified' --> 'com.facebook.react:react-native:0.59.4' --> 'com.android.support:appcompat-v7:28.0.0' --> 'com.android.support:support-compat:28.0.0'
 Dependency path 'MyProject-native-maps:unspecified' --> 'com.facebook.react:react-native:0.59.4' --> 'com.android.support:appcompat-v7:28.0.0' --> 'com.android.support:support-core-utils:28.0.0' --> 'com.android.support:support-compat:28.0.0'
....

Any help appreciated.

@HarshaKoshila
Copy link

HarshaKoshila commented Apr 29, 2019

Magic answer
compileSdkVersion and buildToolsVersion inside in root build.gradle file and in react-native-admob build.gradle must be same

Just like:

 root/ build.gradle                                                           
            compileSdkVersion 28                                                        
            buildToolsVersion "28.0.3"     

.../ react-native-admob build.gradle 
            compileSdkVersion 28                                                        
            buildToolsVersion "28.0.3"                                                   

@jorrharris
Copy link

jorrharris commented May 10, 2019

I'm using 0.59.0-rc.3

and solved by these steps:

  • In gradle-wrapper.properties
    change distributionUrl to distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
  • and in root build.gradle file change gradle classpath to this: classpath 'com.android.tools.build:gradle:3.3.0'
  • Copy file 'metro.config.js' in 0.59-stable/template to your project.
  • Remove node_modules, yarn install, and run-android again.
    (And make sure version of metro in package.json "metro-react-native-babel-preset": "0.51.0" is the same with current metro's version)

Running RN 0.59.8
Tried this and I get this message:
Execution failed for task ':app:processDebugResources'.
Android resource linking failed
C:\Users\jorrh.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\af8030e268737a93bc8a43fec0f8b818\res\values-v28\values-v28.xml:9:5-12:13: AAPT: error: resource android:attr/dialogCornerRadius not found.

C:\Users\jorrh\Desktop\Projects\FitBoard\fitboard\android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:11: AAPT: error: resource android:attr/dialogCornerRadius not found.

C:\Users\jorrh.gradle\caches\transforms-1\files-1.1\design-26.1.0.aar\a6db251e9fbe69fc08fb3996b591f32d\res\values\values.xml:159:5-202: AAPT: error: resource android:attr/fontVariationSettings not found.

C:\Users\jorrh.gradle\caches\transforms-1\files-1.1\design-26.1.0.aar\a6db251e9fbe69fc08fb3996b591f32d\res\values\values.xml:159:5-202: AAPT: error: resource android:attr/ttcIndex not found.

error: failed linking references.

@that-hossein
Copy link

I'm using 0.59.0-rc.3

and solved by these steps:

  • In gradle-wrapper.properties
    change distributionUrl to distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
  • and in root build.gradle file change gradle classpath to this: classpath 'com.android.tools.build:gradle:3.3.0'
  • Copy file 'metro.config.js' in 0.59-stable/template to your project.
  • Remove node_modules, yarn install, and run-android again.
    (And make sure version of metro in package.json "metro-react-native-babel-preset": "0.51.0" is the same with current metro's version)

THIS WORKS FOR ME

@hugomejia
Copy link

I encountered this issue while upgrading a project from react-native:0.58.6 to 0.59.8, and thanks to @kimbui87, the solution was : In gradle-wrapper.properties change distributionUrl to distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip and in root build.gradle file change gradle classpath to this: classpath 'com.android.tools.build:gradle:3.3.0' , so thanks a lot !!!!

@lazymesh
Copy link

lazymesh commented Jun 12, 2019

I had to change the buildscript object in build.gradle to match with the emulator sdk version as

buildscript {
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 16
compileSdkVersion = 28
targetSdkVersion = 28
supportLibVersion = "28.0.0"
}
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}

}

@vipinsharma22
Copy link

Try this.

In gradle-wrapper.properties
change distributionUrl to distributionUrl=https://services.gradle.org/distributions/gradle-4.10.1-all.zip
and in root build.gradle file change gradle classpath to this: classpath 'com.android.tools.build:gradle:3.3.0'
Copy file 'metro.config.js' in 0.59-stable/template to your project.
Remove node_modules, yarn install, and run-android again.
(And make sure version of metro in package.json "metro-react-native-babel-preset": "0.51.0" is the same with current metro's version)

@zhou7102
Copy link

I'm using 0.59.0-rc.3
and solved by these steps:

  • In gradle-wrapper.properties
    change distributionUrl to distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
  • and in root build.gradle file change gradle classpath to this: classpath 'com.android.tools.build:gradle:3.3.0'
  • Copy file 'metro.config.js' in 0.59-stable/template to your project.
  • Remove node_modules, yarn install, and run-android again.
    (And make sure version of metro in package.json "metro-react-native-babel-preset": "0.51.0" is the same with current metro's version)

Running RN 0.59.8
Tried this and I get this message:
Execution failed for task ':app:processDebugResources'.
Android resource linking failed
C:\Users\jorrh.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\af8030e268737a93bc8a43fec0f8b818\res\values-v28\values-v28.xml:9:5-12:13: AAPT: error: resource android:attr/dialogCornerRadius not found.

C:\Users\jorrh\Desktop\Projects\FitBoard\fitboard\android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:11: AAPT: error: resource android:attr/dialogCornerRadius not found.

C:\Users\jorrh.gradle\caches\transforms-1\files-1.1\design-26.1.0.aar\a6db251e9fbe69fc08fb3996b591f32d\res\values\values.xml:159:5-202: AAPT: error: resource android:attr/fontVariationSettings not found.

C:\Users\jorrh.gradle\caches\transforms-1\files-1.1\design-26.1.0.aar\a6db251e9fbe69fc08fb3996b591f32d\res\values\values.xml:159:5-202: AAPT: error: resource android:attr/ttcIndex not found.

error: failed linking references.

Sorry, I am facing the same problem now. Have you figured it out?

@cinan
Copy link

cinan commented Jul 27, 2019

@zhou7102 compare your android/* files with https://github.com/facebook/react-native/tree/0.59-stable/template/android. I upgraded gradle to 5.4.1 and to get rid of the problem above.

@Gasty-WebDev113
Copy link

I'm using 0.59.0-rc.3

and solved by these steps:

  • In gradle-wrapper.properties
    change distributionUrl to distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
  • and in root build.gradle file change gradle classpath to this: classpath 'com.android.tools.build:gradle:3.3.0'
  • Copy file 'metro.config.js' in 0.59-stable/template to your project.
  • Remove node_modules, yarn install, and run-android again.
    (And make sure version of metro in package.json "metro-react-native-babel-preset": "0.51.0" is the same with current metro's version)

I USE THIS WITH "react-native": "0.61.5" AND WORKS !!!!

@jayasme
Copy link

jayasme commented Apr 10, 2020

I'm using 0.59.0-rc.3

and solved by these steps:

  • In gradle-wrapper.properties
    change distributionUrl to distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
  • and in root build.gradle file change gradle classpath to this: classpath 'com.android.tools.build:gradle:3.3.0'
  • Copy file 'metro.config.js' in 0.59-stable/template to your project.
  • Remove node_modules, yarn install, and run-android again.
    (And make sure version of metro in package.json "metro-react-native-babel-preset": "0.51.0" is the same with current metro's version)

I want to say a thank you to my life saver!

@jhonzdev
Copy link

I'm Using 0.59.10

I Implement this solution, but New error Show up

I'm using 0.59.0-rc.3

and solved by these steps:

  • In gradle-wrapper.properties
    change distributionUrl to distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
  • and in root build.gradle file change gradle classpath to this: classpath 'com.android.tools.build:gradle:3.3.0'
  • Copy file 'metro.config.js' in 0.59-stable/template to your project.
  • Remove node_modules, yarn install, and run-android again.
    (And make sure version of metro in package.json "metro-react-native-babel-preset": "0.51.0" is the same with current metro's version)

this is error
2nd error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests