Open Oshianor opened 6 years ago
I am also facing the same issue. Help will be appreciated
Same problem. The problem appear when i update some things in gradle because i couldn't install the app in the device. I needed to do thtat because there was a problem with this package "react-native-linear-gradient". After that, this error shows up
The issue is that the new version of react-native-linear-gradient is using the new gradle and some new syntax. Downgrading to linear-gradient 2.3.0 solves the issue! Simply add "react-native-linear-gradient": "2.3.0"
to your projects package.json
That not works for me, I've tried to downgrading my version o gradle to 2.2.3 but i'm still having the same problem.
This is my package.json :
`"dependencies": {
"moment": "^2.22.2",
"native-base": "^2.7.2",
"react": "16.3.1",
"react-devtools": "^3.2.3",
"react-native": "0.55.2",
"react-native-af-video-player": "^0.2.1",
"react-native-carousel-view": "^0.5.1",
"react-native-datepicker": "^1.7.2",
"react-native-fs": "^2.11.15",
"react-native-router-flux": "^4.0.0-beta.31",
"react-native-smart-carousel": "^1.1.0",
"react-native-svg": "^6.5.2",
"react-native-svg-icon": "^0.8.1",
"react-native-vector-icons": "^5.0.0",
"react-native-video": "^3.1.0",
"react-navigation": "^1.5.12",
"rn-fetch-blob": "^0.10.13",
"react-native-linear-gradient": "2.3.0",
"react-native-keep-awake": "^2.0.6",
"react-native-orientation": "^3.1.0",
"react-native-slider": "https://github.com/abbasfreestyle/react-native-slider.git"
},
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-preset-flow": "^6.23.0",
"babel-jest": "22.4.3",
"babel-preset-react-native": "4.0.0",
"jest": "22.4.3",
"react-test-renderer": "16.3.1"
},
"jest": {
"preset": "react-native"
}
} ` And this is my build.gradle :
`def enableSeparateBuildPerCPUArchitecture = false
/**
android { compileSdkVersion 23 buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.taekwongofront"
minSdkVersion 16
targetSdkVersion 22
versionCode 1
versionName "1.0"
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86"
}
}
buildTypes {
release {
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
def versionCodes = ["armeabi-v7a":1, "x86":2]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
}
}
}
}
dependencies { compile project(':react-native-orientation') compile project(':react-native-keep-awake') compile project(':react-native-linear-gradient') compile project(':rn-fetch-blob') compile project(':react-native-video') compile project(':react-native-vector-icons') compile project(':react-native-svg') compile project(':react-native-fs') compile fileTree(dir: "libs", include: ["*.jar"]) compile "com.android.support:appcompat-v7:23.0.1" compile "com.facebook.react:react-native:+" // From node_modules }
// Run this once to be able to run the application with BUCK // puts all compile dependencies into folder libs for BUCK to use task copyDownloadableDepsToLibs(type: Copy) { from configurations.compile into 'libs' } `
` buildscript { repositories { jcenter() maven { url 'https://maven.google.com' } } dependencies { classpath 'com.android.tools.build:gradle:2.2.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects { repositories { mavenLocal() jcenter() maven { url 'https://maven.google.com' } maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url "$rootDir/../node_modules/react-native/android" } }
`
I got the same problem with react-native-linear-gradient : 2.3.0..
I got the same problem with react-native-linear-gradient : 2.3.0..
Still no update with this issue?
When creating an issue, please ensure that you provide as much information as you can. Issues with a basic description will sadly be ignored as it doesn't help diagnose the issue :(
If you don't help me, I can't help you
¯\_(ツ)_/¯
Here are some common things to include that can help your issue be diagnosed.
[ ] react-native-af-video-player version:
[x] React Native version:
[ ] OS:
[ ] Has this issue already been raised?
[ ] Have you clearly read and understood the Readme?
[ ] Code and explanation to replicate this issue:
[ ] Are there any console logs?
[ ] Include Screeshots / Video: