Skip to content

Difficulties Implementing the 'Expo Support' Guide due to Build Failures #522

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

Open
danboley opened this issue Apr 25, 2025 · 7 comments
Open
Labels
android Affects the Android platform. expo Related to the Expo framework. resolved Issue is resolved but conversation is not concluded.

Comments

@danboley
Copy link

I'm trying to use the twilio-voice-react-native package in a clean Expo project following the approach outlined in the "Expo Support" guide. After modifying the package to work with Expo Modules, I’m consistently hitting a Kotlin build error related to the Task :twilio-voice-react-native-sdk:compileDebugKotlin. Error log provided below. Happy to provide any files or additional info. Thanks.

Build Error:

Task :twilio-voice-react-native-sdk:compileDebugKotlin FAILED
e: file:///Users/danielboley/twilio-voice-react-native/android/src/main/java/com/twiliovoicereactnative/ExpoModule.kt:40:30 Unresolved reference: Outgoing

Task :twilio_voice-react-native-sdk:compileDebugKotlin FAILED
e: file:///Users/danielboley/expo-twilio/node_modules/@twilio/voice-react-native-sdk/android/src/main/java/com/twiliovoicereactnative/ExpoModule.kt:40:30 Unresolved reference: Outgoing

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

  • What went wrong:
    Execution failed for task ':twilio-voice-react-native-sdk:compileDebugKotlin'.

A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
Compilation error. See log for more details

2: Task failed with an exception.

  • What went wrong:
    Execution failed for task ':twilio_voice-react-native-sdk:compileDebugKotlin'.

A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
Compilation error. See log for more details

@mhuynh5757 mhuynh5757 added expo Related to the Expo framework. triaging Investigating but no backlog ticket has been filed. android Affects the Android platform. labels Apr 28, 2025
@mhuynh5757
Copy link
Collaborator

Hey @danboley thanks for reaching out. It appears that maybe the SDK is getting double auto-linked. Can you try to add a file to the root of the SDK react-native.config.js with the contents:

module.exports = {
  dependency: {
    platforms: {
      android: null,
    },
  },
};

@danboley
Copy link
Author

danboley commented May 1, 2025

Hi @mhuynh5757 I appreciate the help with this. I added the suggested file to the root of the SDK and I am still encountering the exact same build error.

@mhuynh5757
Copy link
Collaborator

Just to be sure, can you do a complete clean and rebuild using Android Studio? I'm curious if there's still autolinking that's happening.

@danboley
Copy link
Author

danboley commented May 2, 2025

I ran a complete clean and rebuild and I am still encountering the same build error.

@mhuynh5757
Copy link
Collaborator

Hey @danboley I'm sorry to hear that you're still encountering this issue. Let's see if we can dig into it more. Do you mind sharing a snippet of your ExpoModule.kt file? I'm curious about this Unresolved reference: Outgoing.

The reason I am slightly suspecting a double-autolinking issue is that Expo Modules autolinking (for whatever reason) imports the SDK as twilio_voice-react-native-sdk and the RN CLI imports the SDK as twilio-voice-react-native-sdk. Note the underscore in the first one between twilio and voice and the dash in the second one.

@danboley
Copy link
Author

Hi @mhuynh5757 thanks for reaching back out. Good pickup on the dash vs underscore in the sdk name, I hadn't noticed that previously. Here's the link to my ExpoModule.kt file. Feel free to reference any other files you think might be relevant.

@mhuynh5757
Copy link
Collaborator

Hey @danboley sorry for the delay in getting back to you, could you try OUTGOING instead of Outgoing? It appears the enum is public at the very least: https://github.com/twilio/twilio-voice-react-native/blob/main/android/src/main/java/com/twiliovoicereactnative/CallRecordDatabase.java#L25

I see that the Expo guide that we posted incorrectly uses Outgoing, that's on me, I will fix that as soon as possible.

@mhuynh5757 mhuynh5757 added resolved Issue is resolved but conversation is not concluded. and removed triaging Investigating but no backlog ticket has been filed. labels Jun 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android Affects the Android platform. expo Related to the Expo framework. resolved Issue is resolved but conversation is not concluded.
Projects
None yet
Development

No branches or pull requests

2 participants