Closed javi10823 closed 6 years ago
The last version only works with react-native 0.56.0, but you wouldn't be able to compile, so that's why i am not sure, can you try an older version (6.0.1) or upgrade react-native to 0.56.0?
I need to implement in this version: react-native: 0.55.4 , I will try with 6.0.1 ....
@cesardeazevedo I'm working with the 6.0.1 version, and when compiling i receive this:
"error: resource android:style/TextAppearance.Material.Widget.Button.Borderless.Colored not found. error: resource android:style/TextAppearance.Material.Widget.Button.Colored not found. error: failed linking references." please help
Can you post your build.gradle file?
apply plugin: "com.android.application"
import com.android.build.OutputFile
/**
react-native bundle
with the correct arguments during the Android buildapply from: "../../node_modules/react-native/react.gradle"
line.project.ext.react = [ entryFile: "index.js" ]
apply from: "../../node_modules/react-native/react.gradle"
/**
/**
android { compileSdkVersion 23 buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.govpredict"
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-nested-scroll-view') 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' }
Can you compare with this file and apply the differences? such as compile 'com.android.support:design:25.3.1'
, compile 'com.android.support:appcompat-v7:25.3.1'
, targetSdkVersion 25
and compileSdkVersion 25
ok thanks, that solution works but i have other issue. I will write an email to you
i'm having this trouble, but my React Native version is 0.60.5 :( The version was 0.58 and it worked normally, but I upgraded and it stopped working
same problem using "react-native": "0.61.5"
Environment: OS: macOS High Sierra 10.13.6 Node: 9.11.1 Yarn: 1.7.0 npm: 6.1.0 Watchman: 4.9.0 Xcode: Xcode 9.4.1 Build version 9F2000 Android Studio: 3.1 AI-173.4907809
Packages: (wanted => installed) react: 16.3.1 => 16.3.1 react-native: 0.55.4 => 0.55.4
The project compiles ok, but when I execute the app receive this error
Loading dependency graph, done. error: bundling failed: Error: Unable to resolve module
react-native/Libraries/Components/ScrollView/InternalScrollViewType
from/Users/javierolivieri/projects/govpredict/govpredict/node_modules/react-native-nested-scroll-view/lib/NestedScrollView.js
: Modulereact-native/Libraries/Components/ScrollView/InternalScrollViewType
does not exist in the Haste module mapThis might be related to https://github.com/facebook/react-native/issues/4968 To resolve try the following:
watchman watch-del-all
.node_modules
folder:rm -rf node_modules && npm install
.rm -rf /tmp/metro-bundler-cache-*
ornpm start -- --reset-cache
. 4. Remove haste cache:rm -rf /tmp/haste-map-react-native-packager-*
. at ModuleResolver.resolveDependency (/Users/javierolivieri/projects/govpredict/govpredict/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:161:1460) at ResolutionRequest.resolveDependency (/Users/javierolivieri/projects/govpredict/govpredict/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:91:16) at DependencyGraph.resolveDependency (/Users/javierolivieri/projects/govpredict/govpredict/node_modules/metro/src/node-haste/DependencyGraph.js:272:4579) at dependencies.map.relativePath (/Users/javierolivieri/projects/govpredict/govpredict/node_modules/metro/src/DeltaBundler/traverseDependencies.js:376:19) at Array.map (