twilio / twilio-voice-react-native

Other
62 stars 22 forks source link

[Android] No signature of method #380

Open oleksiiSevrukovRedvike opened 1 week ago

oleksiiSevrukovRedvike commented 1 week ago

Issue

Pre-submission Checklist

Description

I've added twilio-voice-react-native and I can't sync android project now. I get error

A problem occurred evaluating project ':twilio_voice-react-native-sdk'.
> No signature of method: build_bawhh4j7dlbd0hfyx0jm5xngf.android() is applicable for argument types: (build_bawhh4j7dlbd0hfyx0jm5xngf$_run_closure1) values: [build_bawhh4j7dlbd0hfyx0jm5xngf$_run_closure1@230732e0]

Reproduction Steps

  1. Install twilio-voice-react-native
  2. Press "Sync Project with Gradle Files"
  3. See error

Expected Behavior

Android project can be synced

Actual Behavior

I get error on sync step

Reproduction Frequency

100%

Software and Device Information

Please complete the following information.

mhuynh5757 commented 1 week ago

Hi @oleksiiSevrukovRedvike thanks for reaching out. The version details and issue description are much appreciated, thank you. Just to confirm, you were able to build and run your app before installing the Twilio RN SDK as a dependency? And you only started to see this sync issue after you installed the library? Could you try doing a gradle clean using Android Studio, and attempt to build again? If that fails, could you try to remove your node_modules folder, do a clean yarn install, and try building again?

oleksiiSevrukovRedvike commented 1 week ago

Hi @mhuynh5757! Yes, previously sync and build were successful without Twilio RN SDK. Yes, this error appears only after installation of Twilio RN SDK. Gradle clean didn't helped. Remove node_modules folder and clean yarn install didn't helped too.

oleksiiSevrukovRedvike commented 1 week ago

@mhuynh5757 if I remove namespace 'com.twiliovoicereactnative' from build.gradle sync is successful But when I try to make build I get error error: package android.app does not exist in VoiceApplicationProxy.java:8 so it can't import android.app.Application;

oleksiiSevrukovRedvike commented 1 week ago

@mhuynh5757 if I change JavaVersion.VERSION_11 to JavaVersion.VERSION_1_8 build is successful but I get crash immediately with error java.lang.NoClassDefFoundError: Failed resolution of: Lkotlin/collections/CollectionsKt; I have downgraded firebase libraries to versions where they use JavaVersion.VERSION_1_8, but do you have releases with JavaVersion.VERSION_1_8 ?