I have use react-native-vector-icons version "react-native-vector-icons": "^4.0.1",
But when i build the project on Android get error:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApk'.
> A problem occurred configuring project ':react-native-vector-icons'.
> Could not resolve all dependencies for configuration ':react-native-vector-icons:_debugPublishCopy'.
> Could not find com.atlassian.mobile.video:okhttp-ws-compat:3.7.0-atlassian1.
Required by:
followme:react-native-vector-icons:unspecified > com.facebook.react:react-native:0.42.3-atlassian-1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
My project information:
"dependencies": {
"native-base": "^2.0.12",
"react": "15.4.2",
"react-native": "0.42.0",
"react-native-animatable": "^1.1.1",
"react-native-calendar": "^0.10.0",
"react-native-datepicker": "^1.4.7",
"react-native-fbsdk": "^0.5.0",
"react-native-fetch-blob": "^0.10.5",
"react-native-google-places": "^2.0.9",
"react-native-image-picker": "^0.26.2",
"react-native-loading-spinner-overlay": "^0.4.2",
"react-native-localization": "^0.1.29",
"react-native-maps": "^0.12.4",
"react-native-md5": "^1.0.0",
"react-native-popup-dialog": "^0.7.22",
"react-native-router-flux": "^3.38.1",
"react-native-simple-modal": "^5.0.0",
"react-native-sortable-listview": "^0.2.2",
"react-native-vector-icons": "^4.0.1",
"realm": "^1.1.1"
},
I clean build and rebuild still get this error.
Please check me why?
Thank you.
I get same error
Getting same here too...
@oblador please check this issue, many people get same error here!
I'm getting this too. I believe the error is related to https://github.com/facebook/react-native/issues/14225. I'm still searching for a fix that doesn't involve changing versions of react and/or react-native, because my other modules start complaning about unmet dependencies
sh
react-native-cli: 2.0.1
react-native: 0.40.0
js
// package.js
// ...
"dependencies": {
"d3": "^4.9.1",
"moment": "^2.18.1",
"native-base": "^0.5.8",
"react": "15.4.0",
"react-native": "0.40.0",
"react-native-datepicker": "^1.3.2",
"react-native-swipe-list-view": "^0.3.0",
"react-native-vector-icons": "^4.0.0"
}
// ...
From the comments, it says upgrading to react-native 0.42.3 fixes this issue. Have you guys tried this?
thanks @oblador. I hadn't previously found a combination of versions that was working for me, but after following your suggestion, I was able to verify that the following combination helps bypass the error in question (even though it triggers a different error I am currently in the process of working through):
EDIT: the other issue was this one, and is solve-able.
I have react-native 0.44 and still this error appears. Strange that couple days before it compiled just fine with the same setup.
"react": "16.0.0-alpha.6",
"react-native": "^0.44",
Seems more like repository problem
I think it's casued by react native https://github.com/facebook/react-native/issues/14223
@oblador yes, tried on 0.44. And it works.
@xwartz Yes, it seems this has to do with react-native itself, perhaps related to this PR: https://github.com/facebook/react-native/pull/11835 A lot of people seem to be having these issues so lets wait and see if we get an official remedy for this.
dirty fix: goto node_modules/react-native-vector-icons and change this line to compile "com.facebook.react:react-native:0.20.1" -> https://github.com/oblador/react-native-vector-icons/blob/master/android/build.gradle#L33
@bilalsyed001
Have to change tis also in!?:
node_modules/react-native-vector-icons/android/build.gradle
node_modules/react-native-svg/android/build.gradle
node_modules/react-native-push-notification/android/build.gradle
node_modules/react-native-linear-gradient/android/build.gradle
node_modules/react-native-permissions/android/build.gradle
node_modules/react-native-maps/android/build.gradle
node_modules/react-native-geocoder/android/build.gradle
@iegik if deps have compile "com.facebook.react:react-native:+" with '+' then Yes.
I noticed, that compile "com.facebook.react:react-native:+" should be fixed to exacly project version of RN, e.c. We use RN 0.39.2, so changing to compile "com.facebook.react:react-native:0.39.2" in all dependences fixed the problem.
Thank you @iegik & @bilalsyed001, saved my day !
@iegik changed version compile "com.facebook.react:react-native:+" to compile "com.facebook.react:react-native:0.39.2" works for me. thanks!
@oblador It should have been fixed https://github.com/facebook/react-native/issues/14225#issuecomment-305073392
Closing this due to it being fixed at the source. Thanks guys!
getting issue while android build:
* What went wrong:
A problem occurred configuring project ':app'.
> A problem occurred configuring project ':react-native-vector-icons'.
> failed to find target with hash string 'android-26' in: /opt/android-sdk
package.json
{
"name": "sidemenu",
"version": "2.0.0",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"material-ui": "^0.17.4",
"react": "16.0.0-alpha.6",
"react-dom": "^15.5.4",
"react-native": "^0.43.4",
"react-native-i18n": "^0.1.1",
"react-native-linear-gradient": "^2.0.0",
"react-native-vector-icons": "^4.0.1",
"react-redux": "^5.0.4",
"react-tap-event-plugin": "^2.0.1",
"redux": "^3.6.0",
"redux-saga": "^0.14.6"
},
"devDependencies": {
"babel-jest": "19.0.0",
"babel-preset-react-native": "1.9.1",
"jest": "19.0.2",
"react-test-renderer": "16.0.0-alpha.6"
},
"jest": {
"preset": "react-native"
}
}
app/build.gradle
apply plugin: "com.android.application"
import com.android.build.OutputFile
apply from: "../../node_modules/react-native/react.gradle"
def enableSeparateBuildPerCPUArchitecture = false
def enableProguardInReleaseBuilds = false
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.sidemenu"
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 fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
compile project(':react-native-linear-gradient')
compile project(':react-native-i18n')
compile project(':react-native-vector-icons')
}
// 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'
}
Hotfix:
sed -i -- "s/buildToolsVersion .*/buildToolsVersion \"26.0.1\"/" node_modules/**/build.gradle
sed -i -- "s/compileSdkVersion .*/compileSdkVersion 26/" node_modules/**/build.gradle
sed -i -- "s/targetSdkVersion .*/targetSdkVersion 26/" node_modules/**/build.gradle
Updated:
failed to find target with hash string 'android-26' in: /opt/android-sdk
Install android-26 SDK tools
See more:
@iegik installing SDK tools fixed it for me. Thanks!
Most helpful comment
From the comments, it says upgrading to react-native
0.42.3fixes this issue. Have you guys tried this?