Since my last update, my build .apk app is not working anymore on Android. On emulator, the app is working properly but when i open it on phone, it's crash instantly.
package.json :
"name": "xxx",
"version": "0.9.0",
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web"
},
"dependencies": {
"#react-navigation/bottom-tabs": "^6.4.0",
"#react-navigation/native": "^6.0.13",
"#react-navigation/native-stack": "^6.9.0",
"axios": "^0.27.2",
"expo": "~46.0.13",
"expo-secure-store": "~11.3.0",
"expo-splash-screen": "~0.16.2",
"expo-status-bar": "~1.4.0",
"expo-updates": "^0.14.6",
"react": "18.0.0",
"react-native": "0.69.6",
"react-native-reanimated": "~2.9.1",
"react-native-safe-area-context": "^4.3.1",
"react-native-screens": "~3.15.0"
},
"devDependencies": {
"#babel/core": "^7.12.9"
},
"private": true
}
app.json :
"expo": {
"name": "name",
"slug": "name",
"version": "0.9.0",
"orientation": "portrait",
"icon": "./src/assets/icon_android.png",
"userInterfaceStyle": "light",
"splash": {
"image": "./src/assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#fff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./src/assets/icon_android.png",
"backgroundColor": "#FFFFFF"
},
"package": "xx.xxx.xx"
},
"web": {
"favicon": "./src/assets/favicon.png"
},
"extra": {
"eas": {
"projectId": "myid"
}
}
}
}
Thank you to everyone who will help me! from what i could see on similar problems, it could come from the packages
I ended up starting from an old save which allowed me to isolate the problem:
it seems that the expo-updates package crashes the app if present in package.json
Related
I am developing an application capable of playing an IPTV list. All the contents are in mkv format and most are reproduced correctly but in some the image remains black while the sound is heard.
This is the metadata of the video:
{
"audioTracks": Array [
Object {
"bitrate": "",
"index": 0,
"language": "und",
"title": "2",
"type": "audio/mpeg",
},
],
"canPlayFastForward": true,
"canPlayReverse": true,
"canPlaySlowForward": true,
"canPlaySlowReverse": true,
"canStepBackward": true,
"canStepForward": true,
"currentTime": 0,
"duration": 7097.049,
"naturalSize": Object {
"height": 0,
"orientation": "portrait",
"width": 0,
},
"textTracks": Array [],
"trackId": "-1",
"videoTracks": Array [
Object {
"bitrate": 0,
"codecs": "",
"height": 404,
"trackId": "1",
"width": 720,
},
],
}
This is the code I use with the react-native-video library:
<Video
key={keyload}
ref={(ref) => {setVideo(ref)}}
style={styles.video}
onLoad={(data) => setMetadata(data)}//
source={{
uri: uriLoad, initOptions: ['--codec=avcodec']
}}
onProgress={progress => {setProgress(progress.currentTime)}}
controls={false}
fullscreen={true}
paused={paused}
volume={volumen}
fullscreenAutorotate={true}
selectedVideoTrack={videoTrack}
selectedAudioTrack={audioTrack}
selectedTextTrack={textTrack}
resizeMode={resizemode}
onEnd={() => end()}
isLooping
onError={error => playerError(error)}
onPlaybackStatusUpdat
allowsExternalPlayback
e={status => setStatus(() => status)}//setStatus(() => status)
/>
package.json
{
"name": "someiptv",
"version": "1.0.0",
"scripts": {
"start": "expo start --dev-client",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web"
},
"dependencies": {
"#react-native-community/slider": "4.2.3",
"#react-navigation/native": "^6.0.12",
"#react-navigation/native-stack": "^6.8.0",
"expo": "~46.0.9",
"expo-av": "~12.0.4",
"expo-font": "~10.2.0",
"expo-linear-gradient": "~11.4.0",
"expo-screen-orientation": "~4.3.0",
"expo-splash-screen": "~0.16.2",
"expo-sqlite": "~10.3.0",
"expo-status-bar": "~1.4.0",
"lodash.filter": "^4.6.0",
"react": "18.0.0",
"react-dom": "18.0.0",
"react-native": "0.69.5",
"react-native-marquee": "^0.4.0",
"react-native-paper": "^5.0.0-rc.4",
"react-native-safe-area-context": "4.3.1",
"react-native-screens": "~3.15.0",
"react-native-system-setting": "^1.7.6",
"react-native-video": "^6.0.0-alpha.3",
"react-native-web": "~0.18.7",
"react-navigation": "^4.4.4"
},
"devDependencies": {
"#babel/core": "^7.12.9"
},
"private": true
}
I have tried with different versions of the library and with different buffer configurations, but nothing works. Does anyone know why this error occurs and how to fix it? Thanks.
How to fix this error i am using expo react native
ERROR Invariant Violation: ViewPropTypes has been removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'. this is the errors pls also check my code i have provided
My package.json
{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject"
},
"dependencies": {
"#react-native-community/masked-view": "0.1.10",
"#react-navigation/bottom-tabs": "^5.11.10",
"#react-navigation/compat": "^5.3.20",
"#react-navigation/native": "^5.9.4",
"#react-navigation/stack": "^5.14.4",
"expo": "^46.0.0",
"expo-av": "~12.0.4",
"expo-linear-gradient": "~11.4.0",
"expo-status-bar": "~1.4.0",
"haversine": "^1.1.1",
"react": "18.0.0",
"react-dom": "18.0.0",
"react-native": "0.69.5",
"react-native-animatable": "^1.3.3",
"react-native-flexi-radio-button": "^0.2.2",
"react-native-fontawesome": "^7.0.0",
"react-native-gesture-handler": "~2.5.0",
"react-native-modal": "^13.0.0",
"react-native-modalize": "^2.0.8",
"react-native-progress-circle": "^2.1.0",
"react-native-reanimated": "~2.9.1",
"react-native-safe-area-context": "4.3.1",
"react-native-screens": "~3.15.0",
"react-native-snap-carousel": "^3.9.1",
"react-native-swiper": "^1.6.0",
"react-native-web": "~0.18.7",
"react-navigation": "^4.4.4",
"rn-sliding-up-panel": "^2.4.5"
},
"devDependencies": {
"#babel/core": "^7.18.6"
},
"private": true
}
my app.json
{
"expo": {
"name": "amdy-edu",
"slug": "amdy-edu",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#FFFFFF"
}
},
"web": {
"favicon": "./assets/favicon.png"
}
}
}
my babel.config.js
module.exports = function(api) {
api.cache(true);
return {
presets: ['module:metro-react-native-babel-preset'],
plugins: ['react-native-reanimated/plugin'],
};
};
This helped me solve the same issue, Use this instead.
npm i git+https://github.com/LarvenLLC/react-native-snap-carousel.git
Reference: https://github.com/meliorence/react-native-snap-carousel/pull/929#issuecomment-1221294797
The correct fix here is to switch to deprecated-react-native-prop-types or a type system like Typescript.
The problem lies in react-native-snap-carousel. You have 2 choices. You either find an alternative or you navigate to node_modules/react-native-snap-carousel and change all imports to deprecated types.
I try to start vue-native.
$npm install -g vue-native-cli expo-cli
in my project, I installed
$ npm install vue-native-core vue-native-helper --save
$ npm install vue-native-scripts --save-dev
I create vueTransformerPlugin.js and metro.config.js like the guide line told me [https://vue-native.io/docs/installation.html][1]
When I start the projet, I have this isssue
$ npm run web
web Failed to compile.
//vueexpocli/node_modules/expo/AppEntry.js
Module not found: Can't resolve '../../App' in '//vueexpocli/node_modules/expo'
I have looked at a lot of forum
// app.json
{
"expo": {
"name": "vueexpocli",
"slug": "vueexpocli",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
},
"web": {
"favicon": "./assets/favicon.png"
},
"packagerOpts": {
"config": "metro.config.js",
"sourceExts": [
"vue",
"js",
"json",
"ts",
"tsx"
]
}
}
}
//package.json
{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject",
"lint": "eslint ./src ./App.vue --ext .js,.vue",
"lint:fix": "eslint ./src ./App.vue --ext .js,.vue --fix"
},
"dependencies": {
"expo": "~38.0.8",
"expo-status-bar": "^1.0.2",
"react": "~16.11.0",
"react-dom": "~16.11.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-38.0.2.tar.gz",
"react-native-web": "~0.11.7",
"vue-native-core": "^0.1.4",
"vue-native-helper": "^0.1.4",
"vue-native-router": "~0.1.1"
},
"devDependencies": {
"babel-eslint": "^10.0.3",
"eslint": "^6.5.1",
"eslint-config-prettier": "^6.4.0",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-react": "^7.16.0",
"eslint-plugin-vue": "^5.2.3",
"jest-expo": "^35.0.0",
"prettier": "^1.18.2",
"react-test-renderer": "16.8.6",
"vue-native-scripts": "~0.1.4"
},
"private": true
}
I renamed App.js to App.vue and change
// App.vue
<template>
<view class="container">
<text class="text-color-primary">My Vue Native App</text>
</view>
</template>
<style>
.container {
background-color: white;
align-items: center;
justify-content: center;
flex: 1;
}
.text-color-primary {
color: blue;
}
</style>
Do you have any ideas ?
I see a lot of forum.
I tried to rename in AppEntry.js App to App.vue but I have an issue as well.
Please, Please, Help me !
I believe (as of this post) vue-native web mode is currently broken
https://github.com/GeekyAnts/vue-native-core/issues/268
(https://github.com/GeekyAnts/vue-native-core/issues/235 for specific error message)
Issue has been open a while, so hopefully gets fixed in 2021 :D
For now have to just test/run as android/ios rather than web.
i already create app with react-native and it's run perfectly on local devices
when i tried to create apk with
exp build:android
this error appear :- Standalone build failed!
then i run this command expo build:android errors
this is the result:-
Can't read JSON file: /Users/mohamed/Desktop/oils/errors/package.json
[04:58:12] └─ Cause: Error: ENOENT: no such file or directory, open '/Users/mohamed/Desktop/oils/errors/package.json'
/[04:58:12] There is an error with your project. See above logs for information.
[04:58:12] Set EXPO_DEBUG=true in your env to view the stack trace.
here is my package.json file :-
{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"eject": "expo eject"
},
"dependencies": {
"#expo/vector-icons": "^9.0.0",
"axios": "^0.18.0",
"expo": "^32.0.0",
"native-base": "^2.10.0",
"react": "16.5.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",
"react-native-carousel": "^0.11.0",
"react-native-image-picker": "^0.28.0",
"react-native-modal": "^7.0.2",
"react-native-photo-view": "^1.5.2",
"react-native-render-html": "^3.10.0",
"react-native-responsive-screen": "^1.2.0",
"react-native-snap-carousel": "^3.7.5",
"react-native-swipe-gestures": "^1.0.3",
"react-native-swiper": "^1.5.14",
"react-native-swiper-flatlist": "^1.0.9",
"react-native-vector-icons": "^6.1.0",
"react-native-video": "^4.3.1",
"react-native-video-controls": "^1.5.1",
"react-native-whc-toast": "^1.0.0",
"react-native-youtube": "^1.1.0",
"react-navigation": "^3.0.9"
},
"devDependencies": {
"babel-preset-expo": "^5.0.0",
"reactotron-react-native": "^2.1.4"
},
"private": true
}
my app.json
{
"expo": {
"name": "oils",
"slug": "oils",
"privacy": "public",
"sdkVersion": "32.0.0",
"platforms": [
"ios",
"android"
],
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.kamatcho.oils"
},
"android": {
"package": "com.kamatcho.oils"
}
}
}
How i can fix that ??
I think so
app.json
"sdkVersion": "31.0.0",
or
new expo init newproject.
and
I recommend installing and executing all of the parts in "dependencies" or, if nothing wrong, putting a code in it to do it
I am working on a build script that uses rollup along with other tools to build stuff. Everything works well individully, but npm-watch is being very selective in what it listens to. I have confiured it to use four different eatches, but only one (watch:js) responds. Here is a link to the repo. Here is the package.json:
{
"name": "es6_rollup_seed",
"version": "1.0.0",
"description": "an npm build environment that implements rollup.js",
"main": "index.js",
"watch": {
"watch:html": {
"patterns": [
"src"
],
"extensions": "html"
},
"watch:js": {
"patterns": [
"src/js"
],
"extensions": "js"
},
"watch:img": {
"patterns": [
"src/img"
],
"extensions": "jpg,png,svg,gif"
},
"watch:css": {
"patterns": [
"src/scss"
],
"extensions": "scss"
}
},
"scripts": {
"test": "npm run test",
"start": "run-s init:*",
"init:create-folders": "mkdirp build/js build/css build/img",
"init:copy-content": "run-s copy-html",
"init:start": "run-p serve watch:*",
"serve": "lite-server -c bs-config.json",
"watch:html": "npm-watch copy-html",
"watch:js": "npm-watch compile-js",
"watch:img": "npm-watch copy-images",
"watch:css": "npm-watch compile-css",
"copy-html": "cpx src/*.html build",
"copy-images": "cpx src/img/*.* build/img",
"compile-js": "rollup -c",
"compile-css": "node-sass --output-style expanded --source-map true src/scss/app.scss --output build/css"
},
"repository": {
"type": "git",
"url": "git+https://github.com/sean-olson/build_environments.git"
},
"keywords": [
"rollup",
"build",
"tool",
"npm"
],
"author": "Sean Olson",
"license": "MIT",
"bugs": {
"url": "https://github.com/sean-olson/build_environments/issues"
},
"homepage": "https://github.com/sean-olson/build_environments#readme",
"devDependencies": {
"babel-core": "^6.26.0",
"babel-preset-es2015-rollup": "^3.0.0",
"cpx": "^1.5.0",
"lite-server": "^2.3.0",
"node-sass": "^4.7.2",
"npm-run-all": "^4.1.2",
"npm-watch": "^0.3.0",
"rollup": "^0.56.5",
"rollup-plugin-babel": "^3.0.3",
"rollup-plugin-commonjs": "^9.0.0",
"rollup-plugin-node-resolve": "^3.2.0",
"rollup-plugin-replace": "^2.0.0"
}
}
The solution is to use another module, in this case watch-cli