This is the log I get when I try to build for Android, while iOS build was successful.
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 2067 file(s) to forward-jetify. Using 4 workers...
info Starting JS server...
emulator -list-avds.Configure project :app
Installing unimodules:
[email protected] from G:\RC_RN\node_modules\@unimodules\core
[email protected] from G:\RC_RN\node_modules\@unimodules\react-native-adapter
[email protected] from G:\RC_RN\node_modules\expo-app-loader-provider
[email protected] from G:\RC_RN\node_modules\expo-av
[email protected] from G:\RC_RN\node_modules\expo-constants
[email protected] from G:\RC_RN\node_modules\expo-file-system
[email protected] from G:\RC_RN\node_modules\expo-haptics
[email protected] from G:\RC_RN\node_modules\expo-permissions
[email protected] from G:\RC_RN\node_modules\expo-web-browser
[email protected] from G:\RC_RN\node_modules\unimodules-barcode-scanner-interface
[email protected] from G:\RC_RN\node_modules\unimodules-camera-interface
[email protected] from G:\RC_RN\node_modules\unimodules-constants-interface
[email protected] from G:\RC_RN\node_modules\unimodules-face-detector-interface
[email protected] from G:\RC_RN\node_modules\unimodules-file-system-interface
[email protected] from G:\RC_RN\node_modules\unimodules-font-interface
[email protected] from G:\RC_RN\node_modules\unimodules-image-loader-interface
[email protected] from G:\RC_RN\node_modules\unimodules-permissions-interface
[email protected] from G:\RC_RN\node_modules\unimodules-sensors-interface
[email protected] from G:\RC_RN\node_modules\unimodules-task-manager-interface
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileColregisterResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCol
Configure project :react-native-audio
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
Configure project :react-native-firebase
react-native-firebase: using React Native prebuilt binary from G:\RC_RN\node_modules\react-native\android
Configure project :reactnativekeyboardinput
WARNING: The specified Android SDK Build Tools version (25.0.0) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.4.2.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '25.0.0'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
Configure project :reactnativenotifications
downloadRobolectricDependencies into G:\RC_RN\android\build\robolectric-3.5.1-dependencies
Configure project :rn-extensions-share
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: The specified Android SDK Build Tools version (23.0.1) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.4.2.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '23.0.1'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
Configure project :rn-user-defaults
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: The specified Android SDK Build Tools version (23.0.1) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.4.2.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '23.0.1'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.5/userguide/command_line_interface.html#sec:command_line_warnings
FAILURE: Build failed with an exception.
What went wrong:
Could not determine the dependencies of task ':app:preDebugBuild'.
Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
Could not resolve project :reactnativenotifications.
Required by:
project :app
Cannot choose between the following variants of project :reactnativenotifications:
- reactNative59DebugRuntimeElements
- reactNative60DebugRuntimeElements
All of them match the consumer attributes:
- Variant 'reactNative59DebugRuntimeElements' capability RocketChatRN:reactnativenotifications:unspecified:
- Unmatched attributes:
- Found RNNotifications.reactNativeVersion 'reactNative59' but wasn't required.
- Found com.android.build.api.attributes.VariantAttr 'reactNative59Debug' but wasn't required.
- Required org.jetbrains.kotlin.platform.type 'androidJvm' but no value provided.
- Compatible attributes:
- Required com.android.build.api.attributes.BuildTypeAttr 'debug' and found compatible value 'debug'.
- Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found compatible value 'Aar'.
- Required org.gradle.usage 'java-runtime' and found compatible value 'java-runtime'.
- Variant 'reactNative60DebugRuntimeElements' capability RocketChatRN:reactnativenotifications:unspecified:
- Unmatched attributes:
- Found RNNotifications.reactNativeVersion 'reactNative60' but wasn't required.
- Found com.android.build.api.attributes.VariantAttr 'reactNative60Debug' but wasn't required.
- Required org.jetbrains.kotlin.platform.type 'androidJvm' but no value provided.
- Compatible attributes:
- Required com.android.build.api.attributes.BuildTypeAttr 'debug' and found compatible value 'debug'.
- Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found compatible value 'Aar'.
- Required org.gradle.usage 'java-runtime' and found compatible value 'java-runtime'.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 1m 31s
error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
What went wrong:
Could not determine the dependencies of task ':app:preDebugBuild'.
Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
Could not resolve project :reactnativenotifications.
Required by:
project :app
Cannot choose between the following variants of project :reactnativenotifications:
- reactNative59DebugRuntimeElements
- reactNative60DebugRuntimeElements
All of them match the consumer attributes:
- Variant 'reactNative59DebugRuntimeElements' capability RocketChatRN:reactnativenotifications:unspecified:
- Unmatched attributes:
- Found RNNotifications.reactNativeVersion 'reactNative59' but wasn't required.
- Found com.android.build.api.attributes.VariantAttr 'reactNative59Debug' but wasn't required.
- Required org.jetbrains.kotlin.platform.type 'androidJvm' but no value provided.
- Compatible attributes:
- Required com.android.build.api.attributes.BuildTypeAttr 'debug' and found compatible value 'debug'.
- Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found compatible value 'Aar'.
- Required org.gradle.usage 'java-runtime' and found compatible value 'java-runtime'.
- Variant 'reactNative60DebugRuntimeElements' capability RocketChatRN:reactnativenotifications:unspecified:
- Unmatched attributes:
- Found RNNotifications.reactNativeVersion 'reactNative60' but wasn't required.
- Found com.android.build.api.attributes.VariantAttr 'reactNative60Debug' but wasn't required.
- Required org.jetbrains.kotlin.platform.type 'androidJvm' but no value provided.
- Compatible attributes:
- Required com.android.build.api.attributes.BuildTypeAttr 'debug' and found compatible value 'debug'.
- Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found compatible value 'Aar'.
- Required org.gradle.usage 'java-runtime' and found compatible value 'java-runtime'.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 1m 31s
at checkExecSyncError (child_process.js:611:11)
at execFileSync (child_process.js:629:13)
at runOnAllDevices (G:\RC_RN\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:39)
at process._tickCallback (internal/process/next_tick.js:68:7)
I am facing the same issue too :(
Failed to launch emulator. Reason: No emulators found as an output of emulator -list-avds.
warn Please launch an emulator manually or connect a device. Otherwise app may fail to launch.
I'm getting the same error, too.
RN 0.59.9 to 0.60.5 migration
@jedhelmers try cd android && ./gradlew clean. Cleaning fixed the problem for me.
Nope! haha. But that is my go-to command!
I think this error is related to react-native-notifications and is buried deep inside settings.gradle. I changed the path from ../node_modules/react-native-notifications/android/app to ../node_modules/react-native-notifications/android/app/src/ and
include ':reactnativenotifications' to include ':react-native-notifications' and the error goes away.