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 : Duplicate interface definition #36

Open
toliko-coding opened this issue Oct 17, 2023 · 7 comments
Open

Error : Duplicate interface definition #36

toliko-coding opened this issue Oct 17, 2023 · 7 comments

Comments

@toliko-coding
Copy link

Hi , I’m using Flutter 3.13.7 and I’m trying to add the sms_advanced plugin version 1.1.0 to my project, when I run the app using Flutter run I get an error from the Xcode 15 build that says Semantic Issue (Xcode): Duplicate interface definition for class 'SmsAdvancedPlugin', after the error I can’t run the emulator in the project even if I delete the plugin im using Macbook pro m1 / VScode / iphone 15 pro max emulator

I tried to install the plugin using flutter pub get sms_advanced , and tried to install using the dependencies way and flutter pub get

2.Reinstalled Xcode and make sure that the app is updated

3.I tried to delete the duplication in the ms_advanced-Swift.h file but when i run the app the definition that i just deleted come back .

4.flutter clean / clean build in Xcode and rebuild

5.start new flutter projects

@faslurajan
Copy link

Hi , I’m using Flutter 3.13.7 and I’m trying to add the sms_advanced plugin version 1.1.0 to my project, when I run the app using Flutter run I get an error from the Xcode 15 build that says Semantic Issue (Xcode): Duplicate interface definition for class 'SmsAdvancedPlugin', after the error I can’t run the emulator in the project even if I delete the plugin im using Macbook pro m1 / VScode / iphone 15 pro max emulator

I tried to install the plugin using flutter pub get sms_advanced , and tried to install using the dependencies way and flutter pub get

2.Reinstalled Xcode and make sure that the app is updated

3.I tried to delete the duplication in the ms_advanced-Swift.h file but when i run the app the definition that i just deleted come back .

4.flutter clean / clean build in Xcode and rebuild

5.start new flutter projects

I'm facing same issue here. Same error coming up and I followed the same steps as you. Nothing worked

@faslurrajah
Copy link

I solved it by editing pubspec.yaml of "sms_advanced" plugin. (Not App's pubspec.yaml)

Edit from this

plugin:
platforms:
android:
package: com.elyudde.sms_advanced
pluginClass: SmsAdvancedPlugin
ios:
pluginClass: UssdAdvancedPlugin
web:
pluginClass: SmsAdvancedPlugin
fileName: sms_advanced_web.dart

To this

plugin:
platforms:
android:
package: com.elyudde.sms_advanced
pluginClass: SmsAdvancedPlugin

@jvegaseg
Copy link

Same problem, @faslurajan where is located that pubspec.yaml?

@faslurrajah
Copy link

Same problem, @faslurajan where is located that pubspec.yaml?

  1. First download the sms_advanced repository and put it on your Flutter project
  2. Add the sms_advanced plugin using local path. Lets say you have added sms_advanced directory on your flutter on root/custom_plugins/sms_advanced_master

added sms_advavanced on root/pubspec.yaml file like below

  sms_advanced:
    path: ../custom_plugins/sms_advanced_master
  1. Now go to root/custom_plugins/sms_advanced_master/pubbspec.yaml and change like below
    from this
plugin:
platforms:
android:
package: com.elyudde.sms_advanced
pluginClass: SmsAdvancedPlugin
ios:
pluginClass: UssdAdvancedPlugin
web:
pluginClass: SmsAdvancedPlugin
fileName: sms_advanced_web.dart

To this

plugin:
platforms:
android:
package: com.elyudde.sms_advanced
pluginClass: SmsAdvancedPlugin

@jvegaseg
Copy link

thanks for your help. No luck, same results.

@faslurrajah
Copy link

thanks for your help. No luck, same results.

Try doing a flutter clean

@jvegaseg
Copy link

thanks, flutter clean was the solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants