弹出的EXPO项目中的android独立应用程序仅显示空白屏幕

时间:2019-04-08 03:09:13

标签: android react-native expo

我在使用弹出的EXPO项目时遇到问题。 我创建了一个expo项目并将其弹出。 在发布之前,它在ios和android上都可以很好地工作,也就是说,在本地上也可以工作。

发布后,ios独立应用程序运行良好,但android独立应用程序仅显示空白屏幕,而不显示其他任何屏幕。

下面是我的app.json文件。

class CustomUserAdmin(UserAdmin):
    add_form = CustomUserCreationForm
    form = CustomUserChangeForm
    model = CustomUser
    list_display = ['email', 'username', 'is_staff',]


admin.site.register(CustomUser, CustomUserAdmin)

下面是我的package.json文件。

{
  "expo": {
    "name": "neighborhood",
    "description": "This project is really great.",
    "slug": "neighborhood",
    "privacy": "public",
    "sdkVersion": "30.0.0",
    "platforms": [
      "ios",
      "android"
    ],
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./src/assets/images/icon.png",
    "notification": {
      "icon": "./src/assets/images/notification_icon.png",
      "color": "#000000"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "supportsTablet": true,
      "bundleIdentifier": "........",
      "publishBundlePath": "ios/neighborhood/Supporting/shell-app.bundle",
      "publishManifestPath": "ios/neighborhood/Supporting/shell-app-manifest.json"
    },
    "android": {
      "package": "............",
      "publishBundlePath": "android/app/src/main/assets/shell-app.bundle",
      "publishManifestPath": "android/app/src/main/assets/shell-app-manifest.json"
    },
    "isDetached": true,
    "detach": {
      "iosExpoViewUrl": "https://s3.amazonaws.com/exp-exponent-view-code/ios-v2.8.4-sdk30.0.0-3de13133-1adc-4ba1-8569-a84011e570b4.tar.gz",
      "androidExpoViewUrl": "https://s3.amazonaws.com/exp-exponent-view-code/android-v2.8.1-sdk30.0.0-271c32ab-0715-4dfb-8270-ecead3679bb4.tar.gz"
    },
    "scheme": "expe0dee74a172e495fbe7bdc05832274ac"
  }
}

如前所述,ios独立应用程序运行良好,但android独立应用程序显示空白屏幕。

PS:App.js文件

{
  "name": "empty-project-template",
  "main": "node_modules/expo/AppEntry.js",
  "private": true,
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "eject": "expo eject"
  },
  "dependencies": {
    "emoticons-converter": "^1.0.3",
    "expo": "^30.0.1",
    "expokit": "^1.7.1",
    "react": "16.3.1",
    "react-native": "https://github.com/expo/react-native/archive/sdk-30.0.0.tar.gz",
    "react-native-autolink": "^1.4.0",
    "react-native-image-resizer": "^1.0.0",
    "react-native-indicators": "^0.13.0",
    "react-native-modal": "^6.5.0",
    "react-native-onesignal": "^3.2.8",
    "react-native-orientation": "^3.1.3",
    "react-native-phone-call": "^1.0.9",
    "react-navigation": "^2.18.0",
    "runes": "^0.4.3"
  }
}

PS:SignIn.js

import React, {Component} from 'react';
import { StyleSheet, Text, View, Navigator, BackHandler, Alert, SQLite } from 'react-native';

import {SafeAreaView, createStackNavigator, createSwitchNavigator} from 'react-navigation';

import SignIn from './src/pages/SignIn';
import CreateProfile from './src/pages/CreateProfile';
import Home from './src/pages/Home';
import CreateNotification from './src/pages/CreateNotification';
... ... ...

const Navigation = createStackNavigator(
    {
        SignIn: {screen: SignIn},
        CreateProfile: {screen: CreateProfile}, 
        Home: {screen: Home},
        ... ... ...
    }
)


export default class App extends Component {

    constructor(props) {
        super(props);
    }

   render() {
        return(
            <Navigation
            />
        )
    }
};

0 个答案:

没有答案