Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Could not set unknown property 'debuggableVariants' for extension 'react' of type com.facebook.react.ReactExtension. #1844

Closed
jayp97 opened this issue May 17, 2023 · 5 comments
Labels
needs review Issue is ready to be reviewed by a maintainer

Comments

@jayp97
Copy link

jayp97 commented May 17, 2023

Build/Submit details page URL

https://expo.dev/accounts/jayp97/projects/langchats/builds/b4595801-2c23-4e44-81b7-11b622116ca6

Summary

I am trying to build for Android. Everything seems to be working up until the run gradlew step.

Using: eas-cli/3.12.1 darwin-x64 node-v16.16.0

I was using the command eas build --platform android --profile development with this eas.json
{
“build”: {
“development”: {
“developmentClient”: true,
“distribution”: “internal”
},
“preview”: {
“distribution”: “internal”
},
“production”: {}
}
}

Managed or bare?

Managed

Environment

expo-env-info 1.0.5 environment info:
System:
OS: macOS 13.3.1
Shell: 5.9 - /bin/zsh
Binaries:
Node: 16.16.0 - /usr/local/bin/node
npm: 8.11.0 - /usr/local/bin/npm
Managers:
CocoaPods: 1.10.0 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
IDEs:
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
npmPackages:
expo: ~48.0.16 => 48.0.16
react-native: 0.70.5 => 0.70.5
npmGlobalPackages:
eas-cli: 3.12.1
Expo Workflow: managed

Error output

Running 'gradlew :app:assembleDebug' in /home/expo/workingdir/build/apps/expo/android
Downloading https://services.gradle.org/distributions/gradle-7.5.1-all.zip
10%
20%.
30%.
40%.
50%.
60%.
70%.
80%.
90%.
100%
Welcome to Gradle 7.5.1!
Here are the highlights of this release:

  • Support for Java 18
  • Support for building with Groovy 4
  • Much more responsive continuous builds
  • Improved diagnostics for dependency resolution
    For more details see https://docs.gradle.org/7.5.1/release-notes.html
    To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/7.5.1/userguide/gradle_daemon.html#sec:disabling_the_daemon.
    Daemon will be stopped at the end of the build
    [stderr]
    ⚠️ Cannot resolve the path to "@acme/api" package.
    [stderr]
    ⚠️ Cannot resolve the path to "@acme/tailwind-config" package.
    [stderr]
    ⚠️ Cannot resolve the path to "@shopify/flash-list" package.
    [stderr]
    ⚠️ Cannot resolve the path to "@tanstack/react-query" package.
    [stderr]
    ⚠️ Cannot resolve the path to "@trpc/client" package.
    [stderr]
    ⚠️ Cannot resolve the path to "@trpc/react-query" package.
    [stderr]
    ⚠️ Cannot resolve the path to "@trpc/server" package.
    [stderr]
    ⚠️ Cannot resolve the path to "expo-dev-client" package.
    [stderr]
    ⚠️ Cannot resolve the path to "expo-random" package.
    [stderr]
    ⚠️ Cannot resolve the path to "expo-secure-store" package.
    [stderr]
    ⚠️ Cannot resolve the path to "expo-status-bar" package.
    [stderr]
    ⚠️ Cannot resolve the path to "nativewind" package.
    [stderr]
    ⚠️ Cannot resolve the path to "react" package.
    [stderr]
    ⚠️ Cannot resolve the path to "react-dom" package.
    [stderr]
    ⚠️ Cannot resolve the path to "react-native-safe-area-context" package.
    [stderr]
    ⚠️ Cannot resolve the path to "react-native-web" package.

Task :react-native-gradle-plugin:pluginDescriptors
Task :react-native-gradle-plugin:processResources
Task :react-native-gradle-plugin:compileKotlin
w: /home/expo/workingdir/build/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactExtension.kt: (10, 37): 'BaseVariant' is deprecated. Deprecated in Java
w: /home/expo/workingdir/build/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactExtension.kt: (119, 30): 'BaseVariant' is deprecated. Deprecated in Java
w: /home/expo/workingdir/build/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactExtension.kt: (135, 26): 'BaseVariant' is deprecated. Deprecated in Java
w: /home/expo/workingdir/build/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactExtension.kt: (157, 32): 'BaseVariant' is deprecated. Deprecated in Java
w: /home/expo/workingdir/build/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactExtension.kt: (163, 31): 'BaseVariant' is deprecated. Deprecated in Java
w: /home/expo/workingdir/build/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactExtension.kt: (171, 36): 'BaseVariant' is deprecated. Deprecated in Java
w: /home/expo/workingdir/build/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactPlugin.kt: (114, 48): 'reactRoot: DirectoryProperty' is deprecated. reactRoot was confusing and has been replace with root to point to your root project and reactNativeDir to point to the folder of the react-native NPM package
w: /home/expo/workingdir/build/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/TaskConfiguration.kt: (10, 37): 'ApplicationVariant' is deprecated. Deprecated in Java
w: /home/expo/workingdir/build/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/TaskConfiguration.kt: (11, 37): 'BaseVariant' is deprecated. Deprecated in Java
w: /home/expo/workingdir/build/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/TaskConfiguration.kt: (12, 37): 'LibraryVariant' is deprecated. Deprecated in Java
w: /home/expo/workingdir/build/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/TaskConfiguration.kt: (27, 51): 'BaseVariant' is deprecated. Deprecated in Java
w: /home/expo/workingdir/build/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/TaskConfiguration.kt: (130, 12): 'ApplicationVariant' is deprecated. Deprecated in Java
w: /home/expo/workingdir/build/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/TaskConfiguration.kt: (131, 12): 'LibraryVariant' is deprecated. Deprecated in Java
w: /home/expo/workingdir/build/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/TaskConfiguration.kt: (251, 14): 'BaseVariant' is deprecated. Deprecated in Java
Task :react-native-gradle-plugin:compileJava NO-SOURCE
Task :react-native-gradle-plugin:classes
Task :react-native-gradle-plugin:inspectClassesForKotlinIC
Task :react-native-gradle-plugin:jar
[stderr]
FAILURE: Build completed with 2 failures.
[stderr]
1: Task failed with an exception.
[stderr]


[stderr]

  • Where:
    [stderr]
    Build file '/home/expo/workingdir/build/apps/expo/android/app/build.gradle' line: 24
    [stderr]
  • What went wrong:
    [stderr]
    A problem occurred evaluating project ':app'.
    [stderr]

Could not set unknown property 'debuggableVariants' for extension 'react' of type com.facebook.react.ReactExtension.
[stderr]

  • Try:
    [stderr]

Run with --stacktrace option to get the stack trace.
[stderr]
Run with --info
[stderr]
or --debug
[stderr]
option to get more log output.
[stderr]
Run with --scan to get full insights.
[stderr]
==============================================================================
[stderr]
2: Task failed with an exception.
[stderr]


[stderr]

  • What went wrong:
    [stderr]
    A problem occurred configuring project ':app'.
    [stderr]

compileSdkVersion is not specified. Please add it to build.gradle
[stderr]

  • Try:
    [stderr]

[stderr]
Run with --stacktrace option to get the stack trace.
[stderr]

Run with --info or --debug option to get more log output.
[stderr]
Run with --scan to get full insights.
[stderr]
==============================================================================
[stderr]

  • Get more help at
    [stderr]
    https://help.gradle.org
    [stderr]
    BUILD FAILED in 1m 26s
    5 actionable tasks: 5 executed
    Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.

Reproducible demo or steps to reproduce from a blank project

This is my app.config.json

const defineConfig = (_ctx: ConfigContext): ExpoConfig => ({
name: "langchats",
slug: "langchats",
version: "1.0.0",
orientation: "portrait",
icon: "./assets/splash-icon.png",
userInterfaceStyle: "light",
splash: {
image: "./assets/splash-icon.png",
resizeMode: "contain",
backgroundColor: "#2368A1",
},
updates: {
fallbackToCacheTimeout: 0,
},
assetBundlePatterns: ["**/*"],
ios: {
supportsTablet: true,
bundleIdentifier: "your.bundle.identifier",
infoPlist: {
NSMicrophoneUsageDescription: "This app uses the microphone",
},
},
android: {
adaptiveIcon: {
foregroundImage: "./assets/splash-icon.png",
backgroundColor: "#2e026d",
},
permissions: ["RECORD_AUDIO", "BILLING"],
package: "com.langchats.app",
},
extra: {
eas: {
projectId: PROJECT_ID,
},
CLERK_PUBLISHABLE_KEY,
},
plugins: ["./expo-plugins/with-modify-gradle.js"],
});

export default defineConfig;

@jayp97 jayp97 added the needs review Issue is ready to be reviewed by a maintainer label May 17, 2023
@jpamarohorta
Copy link

Hello, I'm having the same issue. In my case this started happening after adding the @allboatsrise/expo-marketingcloudsdk library.

Any idea what might be happening?

@brentvatne
Copy link
Member

@jpamarohorta - you should post the issue to https://github.com/allboatsrise/expo-marketingcloudsdk. my guess is that the library isn't compatible with the sdk version that you are using

@brentvatne
Copy link
Member

@jayp97 - i suspect that the config plugin you're using to modify your gradle config is breaking the build. please note that EAS Build will run gradle build on your project, but it's up to you to have a working project. refer to https://docs.expo.dev/build-reference/troubleshooting/ for advice on how to troubleshoot your build issue.

@jpamarohorta
Copy link

Hello, I've continued making tests and the minimum change that causes this error is actually updating Expo from 46.0.21 to 48.0.15 in our case.

This seems to be related to some existing library or configuration that only starts causing problems in version 48. Any idea how we should try to debug it better? Thank you!

@brentvatne
Copy link
Member

@jpamarohorta - i'd suggest following up on the issue you created here: allboatsrise/expo-marketingcloudsdk#10 (comment) or following the troubleshooting guide i linked to above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs review Issue is ready to be reviewed by a maintainer
Projects
None yet
Development

No branches or pull requests

3 participants