Closed antoinedelp closed 1 year ago
What's the reason why you have 3 flavors an 2 build types.
This ends up creating 6 build variants developmentDebug
, productionDebug
, productionRelease
, etc...
You should probably just have 3 build types.
buildTypes {
debug {
signingConfig signingConfigs.debug
debuggable true
}
release {
signingConfig signingConfigs.release
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
flavorDimensions "environment"
productFlavors {
development {
resValue "string", "app_name", "OL-Dev"
resValue "string", "CodePushDeploymentKey", ""
applicationIdSuffix ".debug"
}
staging {
applicationIdSuffix ".preprod"
}
production {
resValue "string", "app_name", "OL"
}
}
Anyway your problem is that this task:
Could not determine the dependencies of task ':app:generateBundledResourcesHashDevelopmentDebug'.
Is causing your build to fail. I believe this might be related to CodePush. Are you using the latest version?
Hi @cortinico , we are using 3 flavors and 2 buid types in order to be able to run our app in development on production/staging environment. This helps us debug issues encountered on the production/staging environments.
I had not updated the code-push package, thanks for pointing this out. I did so and the issue disappeared, but I am getting a new one:
Failed to install the app. Command failed with exit code 1: ./gradlew app:installDevelopmentDebug -PreactNativeDevServerPort=8081 /Users/antoinedelport/Documents/cto/ouimoveup/android/app/src/main/java/com/ouimoveup/MainApplication.java:4: error: cannot find symbol import com.facebook.react.PackageList; ^ symbol: class PackageList location: package com.facebook.react /Users.../ouimoveup/android/app/src/main/java/com/ouimoveup/MainApplication.java:15: error: package com.microsoft.codepush.react does not exist import com.microsoft.codepush.react.CodePush; ^ /Users/.../ouimoveup/android/app/src/main/java/com/ouimoveup/MainApplication.java:16: error: package org.wonday.orientation does not exist import org.wonday.orientation.OrientationActivityLifecycle; ^ /Users/.../ouimoveup/android/app/src/main/java/com/ouimoveup/MainApplication.java:31: error: cannot find symbol List<ReactPackage> packages = new PackageList(this).getPackages(); ^ symbol: class PackageList /Users/.../cto/ouimoveup/android/app/src/main/java/com/ouimoveup/MainApplication.java:43: error: cannot find symbol return CodePush.getJSBundleFile(); ^ symbol: variable CodePush /Users/.../android/app/src/main/java/com/ouimoveup/MainApplication.java:52: error: method does not override or implement a method from a supertype @Override ^ /Users/.../ouimoveup/android/app/src/main/java/com/ouimoveup/MainApplication.java:56: error: method does not override or implement a method from a supertype @Override ^ /Users/.../ouimoveup/android/app/src/main/java/com/ouimoveup/MainApplication.java:69: error: cannot find symbol ReactNativeFlipper.initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); ^ symbol: variable ReactNativeFlipper location: class MainApplication Note: /Users/.../ouimoveup/android/app/build/generated/source/kapt/developmentDebug/ly/img/android/sdk/IMGLYEventAccessors.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.
I can close this issue and create a new one if you prefer! Many thanks.
I can close this issue and create a new one if you prefer!
Yes please 👍
New Version
0.72.2
Old Version
0.67.5
Build Target(s)
Android debug/release
Output of
react-native info
Issue and Reproduction Steps
When trying to update my react-native app to 0.72.2, I encounter this error related to the React Native Gradle Plugin:
This issue occurs whether I'm activating or not hermes, and activating or now the new Architecture. The react-native Awesome project app works fine, but not ours.
I tried added all debuggable variants, switched back to a debug without flavor... still couldn't manage to make it work. I am working to reproduce the issue on a dummy project, by putting the same config than in ours. What could cause this issue? It is very hard to debug properly the gradle process.
Here is our android/app/build.gradle:
Thanks!