Closed sytolk closed 6 years ago
Hey @sytolk
Did you add missingDimensionStrategy
as described in step 3 in the installation guide?
Yes I have missingDimensionStrategy
I have applicationIdSuffix ".debug"
in my project. Maybe this is the reason..
buildTypes {
debug {
minifyEnabled false
applicationIdSuffix ".debug"
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro", "proguard-devsupport.pro"
testProguardFile 'proguard-debug.pro'
}
"dependencies": { "react": "16.3.2", "react-native": "0.56.0-rc.2", "react-native-navigation": "^2.0.2359",
@guyca adding variantFilter to project dir build.gradle fix Gradle build. Maybe its good idea to write this in Documentation ?
If you have in package.json RN 0.56 it's need to exclude reactNative51 and reactNative55 flavors like:
subprojects { subproject ->
afterEvaluate {
if ((subproject.plugins.hasPlugin('android') || subproject.plugins.hasPlugin('android-library'))) {
android {
variantFilter { variant ->
def names = variant.flavors*.name
// To check for a certain build type, use variant.buildType.name == "<buildType>"
if (names.contains("reactNative51") || names.contains("reactNative55")) {
// Gradle ignores any variants that satisfy the conditions above.
setIgnore(true)
}
}
}
}
}
}
@sytolk Please show me your gradle.build file
Mine is fails on ./gradlew assembleRelease
, as discribed on #3317, but succeds with react-native run-android --variant=release
.
I am using RNN 2.0.2377 with react-native 0.55.4.
having this problem too on;
"react-native": "0.56.0-rc.3",
"react-native-navigation": "^2.0.2380"
I had this error and the problem is at this line
missingDimensionStrategy "RNN.reactNativeVersion", "reactNative51" // <- See note below for further instruction regarding compatibility with other React Native versions
For you @gabrielvcbessa should be reactNative55 so need to fix the version of react native to fix the error
:) For you @jonasmedeiros there is not reactNative56 in flavors: https://github.com/wix/react-native-navigation/tree/v2/lib/android/app/src
reactNative55 build variant means after RN v.55+ versions
@sytolk just fixed my answer
@jonasmedeiros under certain circumstances like additional Gradle buildTypes applicationIdSuffix..
if you run ./gradlew assembleRelease
all RNN lib flavors (reactNative51, reactNative55) are build no matter that we have missingDimensionStrategy
defined.
@sytolk It works but I have no idea why. Thank you. Hope RRN will update their docs soon.
Where exactly should I add the snippet that @sytolk posted? I added to app/build.gradle but I don't think it's there.
Oh it's in the android/build.gradle
file, got it.
Still had to add to ignore reactNative56
:
if (names.contains("reactNative51") || names.contains("reactNative56")) {
Otherwise:
*What went wrong:
Execution failed for task ':react-native-navigation:compileReactNative56DebugJavaWithJavac'
Well, thank you for the snippet, @sytolk!
This really should be in the documentation.
thank you @sytolk
1+ same still not work @sytolk
"react-native": "0.56.0",
"react-native-navigation": "alpha"
@herarya have you read this: https://github.com/wix/react-native-navigation/blob/v2/docs/docs/Installing.md#23-compiling-the-correct-build-flavor
@sytolk thanks work after downgrade
"react-native": "0.56.0",
"react-native-navigation": "^2.0.2427",
I've tried to install RNN several times now on a Mac and 2 windows machines. Currently running react-native 0.56.1 RNN 2.0.2427
Whether I use 55 or 56, and change the files appropriately, I always get a version of "compileReactNative55DebugJavaWithJavac".
I've checked all paths to make sure they're correct. Is there a definitive answer for this? I getting pretty down on RNN at this point (many hours wasted).
i had the same issue too, i had to downgrade to version 51
On Tue, Sep 11, 2018 at 4:40 AM steve-allan notifications@github.com wrote:
I've tried to install RNN several times now on a Mac and 2 windows machines. Currently running react-native 0.56.1 RNN 2.0.2427
Whether I use 55 or 56, and change the files appropriately, I always get a version of "compileReactNative55DebugJavaWithJavac".
I've checked all paths to make sure they're correct. Is there a definitive answer for this? I getting pretty down on RNN at this point (many hours wasted).
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/wix/react-native-navigation/issues/3388#issuecomment-420136005, or mute the thread https://github.com/notifications/unsubscribe-auth/AeGnxG6AixpkPXUYqNb5ysI4mRWBGc52ks5uZzCQgaJpZM4UthBQ .
Thanks Traxx10, But still no luck. Don't mean to sound bitter Wix but I'm out, way too much time wasted.
I have in my defaultConfig
missingDimensionStrategy "RNN.reactNativeVersion", "reactNative55"
but its appears that in debug build its have both Gradle tasks: generateReactNative55DebugRFile and generateReactNative51DebugRFile:react-native-navigation:generateReactNative55DebugRFile :react-native-navigation:generateReactNative55DebugSources Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. :react-native-navigation:compileReactNative55DebugJavaWithJavac :react-native-navigation:transformClassesAndResourcesWithPrepareIntermediateJarsForReactNative55Debug :react-native-navigation:generateReactNative51DebugRFile :react-native-navigation:generateReactNative51DebugSources /home/stanimir/structmedia/fuelapp/FuelApp/node_modules/react-native-navigation/lib/android/app/src/reactNative51/java/com/reactnativenavigation/react/SyncUiImplementation.java:8: error: cannot find symbol import com.facebook.react.uimanager.MeasureSpecProvider; ^
If I start
react-native run-android --variant debug
build success too. build failed only with:cd /android ./gradlew assembleDebug
Please slove this error
A problem occurred evaluating project ':app'. > Could not find method missingDimensionStrategy() for arguments [RNN.reactNativ eVersion, reactNative56] on ProductFlavor_Decorated{name=main, dimension=null, m inSdkVersion=DefaultApiVersion{mApiLevel=19, mCodename='null'}, targetSdkVersion =DefaultApiVersion{mApiLevel=26, mCodename='null'}, renderscriptTargetApi=null, renderscriptSupportModeEnabled=null, renderscriptSupportModeBlasEnabled=null, re nderscriptNdkModeEnabled=null, versionCode=null, versionName=null, applicationId =com.newproject, testApplicationId=null, testInstrumentationRunner=null, testIns trumentationRunnerArguments={}, testHandleProfiling=null, testFunctionalTest=nul l, signingConfig=null, resConfig=null, mBuildConfigFields={}, mResValues={}, mPr oguardFiles=[], mConsumerProguardFiles=[], mManifestPlaceholders={}, mWearAppUnb undled=null} of type com.android.build.gradle.internal.dsl.ProductFlavor. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output
Plz Help me with this error
I have in my defaultConfig
missingDimensionStrategy "RNN.reactNativeVersion", "reactNative55"
but its appears that in debug build its have both Gradle tasks: generateReactNative55DebugRFile and generateReactNative51DebugRFileIf I start
react-native run-android --variant debug
build success too. build failed only with: