1. 程式人生 > >react-native-splash-screen 3.0.7配置使用

react-native-splash-screen 3.0.7配置使用

      最近在把之前寫的一個react-native專案升級到最新版本,專案中使用了react-native-splash-screen。在最新版本的react-native-cli中按照文件配置導致報錯。主要是gradle版本太低的問題,現總結一下:
原始碼:reactSplashDemo
1.先檢視版本(截止到2018.6.7)

"dependencies": {
    "react": "16.3.1",
    "react-native": "0.55.4",
    "react-native-splash-screen": "^3.0.7"
  },

2.修改android/app/gradle/wrapper/gradle-wrapper.properties

//此處將gradle通過迅雷等工具下載到本地
distributionUrl=file\:///D:/webProject/gradle-4.4-all.zip

3.修改android/build.gradle

 dependencies {
        classpath 'com.android.tools.build:gradle:3.1.0'

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

4.修改android/app/build.gradle

compileSdkVersion 27 // here
    buildToolsVersion "27.0.3" // here

    defaultConfig {
        applicationId "com.reactsplashdemo"
        minSdkVersion 16
        targetSdkVersion 23 // here
        versionCode 1
        versionName "1.0"
        ndk {
            abiFilters "armeabi-v7a"
, "x86" } } dependencies { ..... compile "com.android.support:appcompat-v7:27.0.2" // here ..... }

5.其餘配置按照官方配置即可

相關推薦

react-native-splash-screen 3.0.7配置使用

      最近在把之前寫的一個react-native專案升級到最新版本,專案中使用了react-native-splash-screen。在最新版本的react-native-cli中按照文件配置導

React Native入門篇—react-native-splash-screen的安裝和配置

注意:未經允許不可私自轉載,違者必究 React Native官方文件:https://reactnative.cn/docs/getting-started/ react-native-splash-screen官方文件:https://github.com/crazycod

react-native 在新版Xcode(10+)中執行出現的問題: node_modules/react-native/third-party/glog-0.3.4 , C compiler ca

解決方法是: github 問題地址  https://github.com/facebook/react-native/issues/19774 I had the same issue bu

react-native init DemoApp --version 0.44.3 解決 CFBundleIdentifier", Does Not Exist

檢視版本: react-native--version 升級:npm update -g react-native-cli package.json 中可以檢視對應react native

React-Native系列》3、RN與native交互之Callback、Promise

pan resolv str string callback 多次調用 modules 函數 等待 接著上一篇《React-Native系列》RN與native交互與數據傳遞,我們接下來研究另外的兩種RN與Native交互的機制 一、Callback機制 首先Calllba

Zabbix 3.0.X 配置客戶端自動註冊(Auto-Registration)

zabbix auto_registration 自動註冊 一、客戶端配置 1、配置zabbix官方源 [root@node11 ~]# rpm -iUh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el

android studio 3.0 安裝配置

1.  安裝jdk1.8 2.複製android sdk  設定代理  mirrors.neusoft.edu.cn  埠 80 http代理  更新sdk  安裝  android support  repository /

Vue-cli 3.0 打包配置

關於Vue-cli3.0打包官網上也沒有給出什麼具體的例子,下面是個人根據專案打包執行成功之後的一些記錄: vue-cli 3.0創立的專案所有的配置都在vue-config.js中完成,下面是我自己的配置: const path = require('path') const

PHP 7.3.0, 7.2.13, 7.1.25, 7.0.33 和 5.6.39 釋出

   PHP 開發團隊同時釋出了五個版本:7.3.0、7.2.13、7.1.25、7.0.33 和 5.6.39 。 PHP 7.3.0 Released PHP 7.0.33 Released PHP 7.1.25 Released PHP 7.2.13 Relea

PHP 7.X安裝Zabbix 3.0.7出現問題解決

A non well formed numeric value encountered [zabbix.php:21 → require_once() → ZBase->run() → ZBase->processRequest() → CView->getOutput() → i

XAMPP with PHP 7.3.0, 7.2.13, 7.1.25, 7.0.33 & 5.6.39 釋出

   XAMPP 更新啦!官方為所有平臺釋出了支援最新 PHP 系列的 XAMPP 新版本,其中包括 PHP 7.3.0, 7.2.13, 7.1.25, 7.0.33 & 5.6.39。 新版本的 PHP(7.3.0) 提供了許多改進和新功能,如 Flexible H

Redis-3.0.7 Sentinel主從切換的叢集管理

D:\Programs\Redis-x64-3.0.501>redis-cli -h 192.168.0.68 info Replication # Replication role:slave master_host:192.168.0.149 master_port:6379 master_lin

(一)OpenCV3.3.0安裝配置(opencv3.3.0+VS2015社群版+64位win7)(轉)

博主是一名準研究生,研究生階段準備學習計算機視覺方向,涉及影象識別和處理,選擇安裝opencv庫作為前期學習工具,因為不懂,所以在網上看了許多關於opencv安裝配置的資料和部落格,最後終於成功了。(哭,opencv一共下載了2.2.9,2.2.11,3.0

nacos 0.7 配置管理

nacos地址:https://nacos.io/zh-cn/ spring-cloud-alibaba:https://github.com/spring-cloud-incubator/spring-cloud-alibaba       spring-cl

android EventBus 3.0 混淆配置

轉載自:http://blog.csdn.net/yangzs516/article/details/51776576 https://github.com/greenrobot/EventBus   使用的這個庫在github的官網README中沒有寫明相應混淆的配置

Android studio 3.0安裝配置方法圖文教程

本文為大家分享了Android studio安裝與配置,具體內容如下 1、首先下載Android studio安裝包,可以從http://www.android-studio.org/,下載最新版本,這裡採用3.0版本進行演示,對應安裝包為android-studio-ide-171.4408382-win

react-native在windows下安裝和配置

zhu’yi本次安裝時基於windows7系統,32位,在虛擬機器上面安裝的。 1、安裝JDK,配置環境變數。 下載JDK,然後配置環境變數JAVA_HOME,還是按照正規路徑來,不然編譯時候找不到就尷尬了。 然後將%JAVA_HOME%\bin;%J

關於react native code push的JS端配置攻略

1. 引用CodePush高階元件,應用在專案根元件中: import CodePush from "react-native-code-push"; class App extends Component { } const codePushOptions = { c

vue-cli 3.0腳手架配置及擴充套件 (三):config.app.js應用目錄配置

工程目錄如圖,config.app.js檔案在src原始碼目錄下config.app.js檔案是我為了方便測試模擬的專案結構,程式碼如下:/** * @fileOverview app配置 * @author Franks.T.D * @date 2018/06/17

React Native 開發之 IDE 選型和配置

原文連結: http://www.infoq.com/cn/articles/react-native-ide?utm_campaign=rightbar_v2&utm_source=infoq&utm_medium=articles_link&