• 1-5 构建官方example-Windows平台


    https://github.com/facebook/react-native

    https://github.com/facebook/react-native.git

     

     https://github.com/facebook/react-native/tree/0.6-stable

    C:UsersHONGZHENHUA eact-native

    我的天,卸载掉旧的Intel HAXM吧,装一个支持win10的Intel HAXM。

    C:UsersHONGZHENHUA.gradlewrapperdistsgradle-4.6-allcst21l2brirad8k2ben1letg

    通过下载工具下载https://services.gradle.org/distributions/gradle-4.6-all.zip这个版本的插件

    H:[BOOT]gradle-4.6-allgradle-4.6samplesuserguidewrappersha256-verificationgradlewrappergradle-wrapper.properties

    distributionBase=GRADLE_USER_HOME
    distributionPath=wrapper/dists
    zipStoreBase=GRADLE_USER_HOME
    zipStorePath=wrapper/dists
    distributionUrl=https://services.gradle.org/distributions/gradle-4.3.1-bin.zip
    distributionSha256Sum=15ebe098ce0392a2d06d252bff24143cc88c4e963346582c8d88814758d93ac7

    C:UsersHONGZHENHUA eact-nativepackage.json

    {
      "name": "react-native",
      "version": "0.6.0",
      "description": "A framework for building native apps using React",
      "license": "BSD-3-Clause",
      "repository": {
        "type": "git",
        "url": "git@github.com:facebook/react-native.git"
      },
      "jest": {
        "scriptPreprocessor": "jestSupport/scriptPreprocess.js",
        "setupEnvScriptFile": "jestSupport/env.js",
        "testPathIgnorePatterns": [
          "/node_modules/",
          "packager/react-packager/src/Activity/"
        ],
        "testFileExtensions": [
          "js"
        ],
        "unmockedModulePathPatterns": [
          "source-map"
        ]
      },
      "main": "Libraries/react-native/react-native.js",
      "files": [
        "React",
        "React.podspec",
        "Examples/SampleApp",
        "Libraries",
        "packager",
        "cli.js",
        "local-cli",
        "init.sh",
        "LICENSE",
        "PATENTS",
        "README.md"
      ],
      "scripts": {
        "test": "jest",
        "lint": "node linter.js Examples/ Libraries/",
        "start": "./packager/packager.sh"
      },
      "bin": {
        "react-native-start": "packager/packager.sh"
      },
      "dependencies": {
        "absolute-path": "0.0.0",
        "babel": "5.4.3",
        "bluebird": "^2.9.21",
        "chalk": "^1.0.0",
        "connect": "2.8.3",
        "debug": "~2.1.0",
        "graceful-fs": "^3.0.6",
        "image-size": "0.3.5",
        "joi": "~5.1.0",
        "jstransform": "11.0.1",
        "module-deps": "3.5.6",
        "optimist": "0.6.1",
        "promise": "^7.0.0",
        "react-timer-mixin": "^0.13.1",
        "react-tools": "0.13.2",
        "rebound": "^0.0.12",
        "sane": "tadeuzagallo/sane#a029f8b04a",
        "source-map": "0.1.31",
        "stacktrace-parser": "frantic/stacktrace-parser#493c5e5638",
        "uglify-js": "~2.4.16",
        "underscore": "1.7.0",
        "worker-farm": "^1.3.1",
        "ws": "0.4.31",
        "yargs": "1.3.2"
      },
      "devDependencies": {
        "jest-cli": "0.4.5",
        "babel-eslint": "3.1.5",
        "eslint": "0.21.2",
        "eslint-plugin-react": "2.3.0"
      }
    }

    https://github.com/facebook/react-native/tree/0.44-stable/Examples/UIExplorer/android/app

    关闭金山毒霸之后又可以下载了,晕死

    H:githubreactnative eact-nativeExamplesUIExplorerandroidappuild.gradle

    H:githubreactnative eact-nativeuild.gradle

    // Copyright 2015-present Facebook. All Rights Reserved.
    
    buildscript {
        repositories {
            jcenter()
            mavenLocal()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:2.2.2'
            classpath 'de.undercouch:gradle-download-task:3.1.2'
    
            // NOTE: Do not place your application dependencies here; they belong
            // in the individual module build.gradle files
        }
    }
    
    allprojects {
        repositories {
            jcenter()
            mavenLocal()
    
            def androidSdk = System.getenv("ANDROID_SDK")
            maven {
                url "$androidSdk/extras/m2repository/"
            }
        }
    }

    改成

    // Copyright 2015-present Facebook. All Rights Reserved.
    
    buildscript {
        repositories {
            jcenter()
            mavenLocal()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:2.2.2'
    	classpath 'com.android.tools.build:gradle:4.6'
            classpath 'de.undercouch:gradle-download-task:3.1.2'
    
            // NOTE: Do not place your application dependencies here; they belong
            // in the individual module build.gradle files
        }
    }
    
    allprojects {
        repositories {
            jcenter()
            mavenLocal()
    
            def androidSdk = System.getenv("ANDROID_SDK")
            maven {
                url "$androidSdk/extras/m2repository/"
            }
        }
    }

    // Copyright 2015-present Facebook. All Rights Reserved.
    
    buildscript {
        repositories {
            jcenter()
            mavenLocal()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:2.2.2'
            classpath 'de.undercouch:gradle-download-task:3.1.2'
    
            // NOTE: Do not place your application dependencies here; they belong
            // in the individual module build.gradle files
        }
    }
    
    allprojects {
        repositories {
            jcenter()
            mavenLocal()
    
            def androidSdk = System.getenv("ANDROID_SDK")
            maven {
                url "$androidSdk/extras/m2repository/"
            }
    	maven { 
    	    url 'http://repo1.maven.org/maven2' 
    	}
    
        }
    }
    // Copyright 2015-present Facebook. All Rights Reserved.
    
    buildscript {
        repositories {
            jcenter()
            mavenLocal()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:2.2.2'
            classpath 'de.undercouch:gradle-download-task:3.1.2'
    
            // NOTE: Do not place your application dependencies here; they belong
            // in the individual module build.gradle files
        }
    }
    
    allprojects {
        repositories {
        	maven { 
    	    url 'http://repo1.maven.org/maven2' 
    	}
            jcenter()
            mavenLocal()
    
            def androidSdk = System.getenv("ANDROID_SDK")
            maven {
                url "$androidSdk/extras/m2repository/"
            }
    
    
        }
    }

    // Copyright 2015-present Facebook. All Rights Reserved.
    
    buildscript {
        repositories {
            jcenter()
            mavenLocal()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:3.1.0'
            classpath 'de.undercouch:gradle-download-task:3.1.2'
    
            // NOTE: Do not place your application dependencies here; they belong
            // in the individual module build.gradle files
        }
    }
    
    allprojects {
        repositories {
            jcenter()
            mavenLocal()
            def androidSdk = System.getenv("ANDROID_SDK")
            maven {
                url "$androidSdk/extras/m2repository/"
            }
    
    
        }
    }

    H:githubreactnative eact-nativegradlewrappergradle-wrapper.properties

    #Mon Jan 16 11:21:59 CST 2017
    distributionBase=GRADLE_USER_HOME
    distributionPath=wrapper/dists
    zipStoreBase=GRADLE_USER_HOME
    zipStorePath=wrapper/dists
    distributionUrl=https://services.gradle.org/distributions/gradle-4.6-all.zip

    C:UsersHONGZHENHUA.gradlecachesmodules-2files-2.1com.android.tools epository25.2.2e19891bc6fe0a19b93b3728d2dea916606c8440c epository-25.2.2.pom

    <?xml version="1.0" encoding="UTF-8"?>
    <project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <modelVersion>4.0.0</modelVersion>
      <groupId>com.android.tools</groupId>
      <artifactId>repository</artifactId>
      <version>25.2.2</version>
      <dependencies>
        <dependency>
          <groupId>com.android.tools</groupId>
          <artifactId>common</artifactId>
          <version>25.2.2</version>
          <scope>runtime</scope>
        </dependency>
        <dependency>
          <groupId>org.apache.commons</groupId>
          <artifactId>commons-compress</artifactId>
          <version>1.8.1</version>
          <scope>runtime</scope>
        </dependency>
        <dependency>
          <groupId>com.google.jimfs</groupId>
          <artifactId>jimfs</artifactId>
          <version>1.1</version>
          <scope>runtime</scope>
        </dependency>
      </dependencies>
      <description>A library for downloading and managing package repositories</description>
      <url>http://tools.android.com/</url>
      <name>com.android.tools.repository</name>
      <licenses>
        <license>
          <name>The Apache Software License, Version 2.0</name>
          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
          <distribution>repo</distribution>
        </license>
      </licenses>
      <developers>
        <developer>
          <name>The Android Open Source Project</name>
        </developer>
      </developers>
      <scm>
        <connection>git://android.googlesource.com/platform/tools/base.git</connection>
        <url>https://android.googlesource.com/platform/tools/base</url>
      </scm>
    </project>

    改成

    <?xml version="1.0" encoding="UTF-8"?>
    <project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <modelVersion>4.0.0</modelVersion>
      <groupId>com.android.tools</groupId>
      <artifactId>repository</artifactId>
      <version>25.2.2</version>
      <dependencies>
        <dependency>
          <groupId>com.android.tools</groupId>
          <artifactId>common</artifactId>
          <version>26.0.0</version>
          <scope>runtime</scope>
        </dependency>
        <dependency>
          <groupId>org.apache.commons</groupId>
          <artifactId>commons-compress</artifactId>
          <version>1.8.1</version>
          <scope>runtime</scope>
        </dependency>
        <dependency>
          <groupId>com.google.jimfs</groupId>
          <artifactId>jimfs</artifactId>
          <version>1.1</version>
          <scope>runtime</scope>
        </dependency>
      </dependencies>
      <description>A library for downloading and managing package repositories</description>
      <url>http://tools.android.com/</url>
      <name>com.android.tools.repository</name>
      <licenses>
        <license>
          <name>The Apache Software License, Version 2.0</name>
          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
          <distribution>repo</distribution>
        </license>
      </licenses>
      <developers>
        <developer>
          <name>The Android Open Source Project</name>
        </developer>
      </developers>
      <scm>
        <connection>git://android.googlesource.com/platform/tools/base.git</connection>
        <url>https://android.googlesource.com/platform/tools/base</url>
      </scm>
    </project>
    // Copyright 2015-present Facebook. All Rights Reserved.
    
    buildscript {
        repositories {
            google()
            jcenter()
            mavenLocal()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:2.2.2'
            classpath 'de.undercouch:gradle-download-task:3.1.2'
    
            // NOTE: Do not place your application dependencies here; they belong
            // in the individual module build.gradle files
        }
    }
    
    allprojects {
        repositories {
            google()
            jcenter()
            mavenLocal()
            def androidSdk = System.getenv("ANDROID_SDK")
            maven {
                url "$androidSdk/extras/m2repository/"
            }
    
    
        }
    }

  • 相关阅读:
    HereDOC案例
    array_number
    CodeMirror---实现关键词高亮
    webstorage的使用
    vue.js--绑定方法到window对象
    docker部署服务实现文件上传到本地问题解决
    ES6之map与set
    JAVA生成视频缩略图的两种方式
    vuex状态管理
    ELK日志分析平台
  • 原文地址:https://www.cnblogs.com/ZHONGZHENHUA/p/10079976.html
Copyright © 2020-2023  润新知