React-native app build problem after install react-native-vector-icons











up vote
0
down vote

favorite












I have a problem in a react-native project after install react-native-vector-icons and try to build android app in the emulator. I'm working on Windows.
I installed the library and linked it as said in the manual, but I think I have a dependency problem.



C:react-native run-android
Scanning folders for symlinks in C:UsersuserSourcereactnativemyappnode_modules (43ms)
Starting JS server...
Building and installing the app on the device (cd android && gradlew.bat installDebug)...

FAILURE: Build failed with an exception.

* Where:
Build file 'C:UsersuserSourcereactnativemyappnode_modulesreact-native-vector-iconsandroidbuild.gradle' line: 4

* What went wrong:
A problem occurred evaluating project ':react-native-vector-icons'.
> Could not find method google() for arguments on repository container.


Installed versions:
"react": "16.3.1",
"react-native": "0.55.4",
"react-native-elements": "^0.19.1",
"react-native-vector-icons": "^6.0.2",



Can somebody help me?










share|improve this question
























  • github.com/oblador/react-native-vector-icons/issues/…
    – Nima
    Oct 26 at 1:52















up vote
0
down vote

favorite












I have a problem in a react-native project after install react-native-vector-icons and try to build android app in the emulator. I'm working on Windows.
I installed the library and linked it as said in the manual, but I think I have a dependency problem.



C:react-native run-android
Scanning folders for symlinks in C:UsersuserSourcereactnativemyappnode_modules (43ms)
Starting JS server...
Building and installing the app on the device (cd android && gradlew.bat installDebug)...

FAILURE: Build failed with an exception.

* Where:
Build file 'C:UsersuserSourcereactnativemyappnode_modulesreact-native-vector-iconsandroidbuild.gradle' line: 4

* What went wrong:
A problem occurred evaluating project ':react-native-vector-icons'.
> Could not find method google() for arguments on repository container.


Installed versions:
"react": "16.3.1",
"react-native": "0.55.4",
"react-native-elements": "^0.19.1",
"react-native-vector-icons": "^6.0.2",



Can somebody help me?










share|improve this question
























  • github.com/oblador/react-native-vector-icons/issues/…
    – Nima
    Oct 26 at 1:52













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I have a problem in a react-native project after install react-native-vector-icons and try to build android app in the emulator. I'm working on Windows.
I installed the library and linked it as said in the manual, but I think I have a dependency problem.



C:react-native run-android
Scanning folders for symlinks in C:UsersuserSourcereactnativemyappnode_modules (43ms)
Starting JS server...
Building and installing the app on the device (cd android && gradlew.bat installDebug)...

FAILURE: Build failed with an exception.

* Where:
Build file 'C:UsersuserSourcereactnativemyappnode_modulesreact-native-vector-iconsandroidbuild.gradle' line: 4

* What went wrong:
A problem occurred evaluating project ':react-native-vector-icons'.
> Could not find method google() for arguments on repository container.


Installed versions:
"react": "16.3.1",
"react-native": "0.55.4",
"react-native-elements": "^0.19.1",
"react-native-vector-icons": "^6.0.2",



Can somebody help me?










share|improve this question















I have a problem in a react-native project after install react-native-vector-icons and try to build android app in the emulator. I'm working on Windows.
I installed the library and linked it as said in the manual, but I think I have a dependency problem.



C:react-native run-android
Scanning folders for symlinks in C:UsersuserSourcereactnativemyappnode_modules (43ms)
Starting JS server...
Building and installing the app on the device (cd android && gradlew.bat installDebug)...

FAILURE: Build failed with an exception.

* Where:
Build file 'C:UsersuserSourcereactnativemyappnode_modulesreact-native-vector-iconsandroidbuild.gradle' line: 4

* What went wrong:
A problem occurred evaluating project ':react-native-vector-icons'.
> Could not find method google() for arguments on repository container.


Installed versions:
"react": "16.3.1",
"react-native": "0.55.4",
"react-native-elements": "^0.19.1",
"react-native-vector-icons": "^6.0.2",



Can somebody help me?







android windows react-native react-native-android android-icons






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Oct 25 at 22:14

























asked Oct 25 at 22:08









aris

10615




10615












  • github.com/oblador/react-native-vector-icons/issues/…
    – Nima
    Oct 26 at 1:52


















  • github.com/oblador/react-native-vector-icons/issues/…
    – Nima
    Oct 26 at 1:52
















github.com/oblador/react-native-vector-icons/issues/…
– Nima
Oct 26 at 1:52




github.com/oblador/react-native-vector-icons/issues/…
– Nima
Oct 26 at 1:52












2 Answers
2






active

oldest

votes

















up vote
1
down vote













Your best option is to either downgrade the vector-icons version or upgrade react-native + react versions.



Another option is to manually update your gradle and gradle-wrapper versions in the android project.



So update the gradle version in the top-level gradle file:



Usually located here: project_name/android/build.gradle



Change to:



dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
}


And also the gradle-wrapper:



Usually located here: project_name/android/gradle/wrapper/gradle-wrapper.properties



Change to:



distributionUrl=https://services.gradle.org/distributions/gradle-4.10.2-all.zip






share|improve this answer



















  • 1




    Thank you for the answer. After several problems with the version of the gradle and react-native on Win10, I got it.
    – aris
    Oct 29 at 21:06


















up vote
0
down vote














  1. Uninstall vector-icons (remove wire-react-vector-icons-native)

  2. Delete the folder node_modules

  3. Then yarn install

  4. Type this command yarn add react-native-vector-icons

  5. Then this react-link native command react-native-vector-icons

  6. Then this command reage-nactive run- android 7 then react-native start --reset-cache


These steps worked for me






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














     

    draft saved


    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f52998801%2freact-native-app-build-problem-after-install-react-native-vector-icons%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote













    Your best option is to either downgrade the vector-icons version or upgrade react-native + react versions.



    Another option is to manually update your gradle and gradle-wrapper versions in the android project.



    So update the gradle version in the top-level gradle file:



    Usually located here: project_name/android/build.gradle



    Change to:



    dependencies {
    classpath 'com.android.tools.build:gradle:3.2.1'
    }


    And also the gradle-wrapper:



    Usually located here: project_name/android/gradle/wrapper/gradle-wrapper.properties



    Change to:



    distributionUrl=https://services.gradle.org/distributions/gradle-4.10.2-all.zip






    share|improve this answer



















    • 1




      Thank you for the answer. After several problems with the version of the gradle and react-native on Win10, I got it.
      – aris
      Oct 29 at 21:06















    up vote
    1
    down vote













    Your best option is to either downgrade the vector-icons version or upgrade react-native + react versions.



    Another option is to manually update your gradle and gradle-wrapper versions in the android project.



    So update the gradle version in the top-level gradle file:



    Usually located here: project_name/android/build.gradle



    Change to:



    dependencies {
    classpath 'com.android.tools.build:gradle:3.2.1'
    }


    And also the gradle-wrapper:



    Usually located here: project_name/android/gradle/wrapper/gradle-wrapper.properties



    Change to:



    distributionUrl=https://services.gradle.org/distributions/gradle-4.10.2-all.zip






    share|improve this answer



















    • 1




      Thank you for the answer. After several problems with the version of the gradle and react-native on Win10, I got it.
      – aris
      Oct 29 at 21:06













    up vote
    1
    down vote










    up vote
    1
    down vote









    Your best option is to either downgrade the vector-icons version or upgrade react-native + react versions.



    Another option is to manually update your gradle and gradle-wrapper versions in the android project.



    So update the gradle version in the top-level gradle file:



    Usually located here: project_name/android/build.gradle



    Change to:



    dependencies {
    classpath 'com.android.tools.build:gradle:3.2.1'
    }


    And also the gradle-wrapper:



    Usually located here: project_name/android/gradle/wrapper/gradle-wrapper.properties



    Change to:



    distributionUrl=https://services.gradle.org/distributions/gradle-4.10.2-all.zip






    share|improve this answer














    Your best option is to either downgrade the vector-icons version or upgrade react-native + react versions.



    Another option is to manually update your gradle and gradle-wrapper versions in the android project.



    So update the gradle version in the top-level gradle file:



    Usually located here: project_name/android/build.gradle



    Change to:



    dependencies {
    classpath 'com.android.tools.build:gradle:3.2.1'
    }


    And also the gradle-wrapper:



    Usually located here: project_name/android/gradle/wrapper/gradle-wrapper.properties



    Change to:



    distributionUrl=https://services.gradle.org/distributions/gradle-4.10.2-all.zip







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Oct 26 at 7:51

























    answered Oct 26 at 7:45









    HedeH

    1,8951019




    1,8951019








    • 1




      Thank you for the answer. After several problems with the version of the gradle and react-native on Win10, I got it.
      – aris
      Oct 29 at 21:06














    • 1




      Thank you for the answer. After several problems with the version of the gradle and react-native on Win10, I got it.
      – aris
      Oct 29 at 21:06








    1




    1




    Thank you for the answer. After several problems with the version of the gradle and react-native on Win10, I got it.
    – aris
    Oct 29 at 21:06




    Thank you for the answer. After several problems with the version of the gradle and react-native on Win10, I got it.
    – aris
    Oct 29 at 21:06












    up vote
    0
    down vote














    1. Uninstall vector-icons (remove wire-react-vector-icons-native)

    2. Delete the folder node_modules

    3. Then yarn install

    4. Type this command yarn add react-native-vector-icons

    5. Then this react-link native command react-native-vector-icons

    6. Then this command reage-nactive run- android 7 then react-native start --reset-cache


    These steps worked for me






    share|improve this answer



























      up vote
      0
      down vote














      1. Uninstall vector-icons (remove wire-react-vector-icons-native)

      2. Delete the folder node_modules

      3. Then yarn install

      4. Type this command yarn add react-native-vector-icons

      5. Then this react-link native command react-native-vector-icons

      6. Then this command reage-nactive run- android 7 then react-native start --reset-cache


      These steps worked for me






      share|improve this answer

























        up vote
        0
        down vote










        up vote
        0
        down vote










        1. Uninstall vector-icons (remove wire-react-vector-icons-native)

        2. Delete the folder node_modules

        3. Then yarn install

        4. Type this command yarn add react-native-vector-icons

        5. Then this react-link native command react-native-vector-icons

        6. Then this command reage-nactive run- android 7 then react-native start --reset-cache


        These steps worked for me






        share|improve this answer















        1. Uninstall vector-icons (remove wire-react-vector-icons-native)

        2. Delete the folder node_modules

        3. Then yarn install

        4. Type this command yarn add react-native-vector-icons

        5. Then this react-link native command react-native-vector-icons

        6. Then this command reage-nactive run- android 7 then react-native start --reset-cache


        These steps worked for me







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Nov 12 at 1:07









        Matt

        750920




        750920










        answered Nov 11 at 23:45









        Asilas

        12




        12






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f52998801%2freact-native-app-build-problem-after-install-react-native-vector-icons%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            List item for chat from Array inside array React Native

            Thiostrepton

            Caerphilly