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

Pub get warning #11

Open
ghenry opened this issue Jul 23, 2020 · 10 comments · Fixed by sun54907/flutter_voip_ios#1
Open

Pub get warning #11

ghenry opened this issue Jul 23, 2020 · 10 comments · Fixed by sun54907/flutter_voip_ios#1
Labels
wontfix This will not be worked on

Comments

@ghenry
Copy link

ghenry commented Jul 23, 2020

Running "flutter pub get" in SureVoIP-Talk...                       0.9s
The plugin `flutter_ios_voip_kit` doesn't have a main class defined in /home/ghenry/development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_ios_voip_kit-0.0.4+1/android/src/main/java/netkeepingblog/flutter_ios_voip_kit/FlutterIOSVoIPKitPlugin.java or /home/ghenry/development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_ios_voip_kit-0.0.4+1/android/src/main/kotlin/netkeepingblog/flutter_ios_voip_kit/FlutterIOSVoIPKitPlugin.kt. This is likely to due to an incorrect `androidPackage: netkeepingblog.flutter_ios_voip_kit` or `mainClass` entry in the plugin's pubspec.yaml.
If you are the author of this plugin, fix the `androidPackage` entry or move the main class to any of locations used above. Otherwise, please contact the author of this plugin and consider using a different plugin in the meanwhile. 
@ghenry
Copy link
Author

ghenry commented Jul 23, 2020

I see it here too:

flutter drive --target=test_driver/app.dart

The plugin `flutter_ios_voip_kit` doesn't have a main class defined in
/development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_ios_voip_kit-0.0.4+1/android/src/main/java/netkeepingblog/flutter_ios_voip_kit/FlutterIOSVoIPKitPlugin.java or
/development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_ios_voip_kit-0.0.4+1/android/src/main/kotlin/netkeepingblog/flutter_ios_voip_kit/FlutterIOSVoIPKitPlugin.kt. This is likely to due to an
incorrect `androidPackage: netkeepingblog.flutter_ios_voip_kit` or `mainClass` entry in the plugin's pubspec.yaml.
If you are the author of this plugin, fix the `androidPackage` entry or move the main class to any of locations used above. Otherwise, please contact the author of this plugin and consider using a different plugin in
the meanwhile.

@masashi-sutou masashi-sutou added the bug Something isn't working label Jul 23, 2020
@masashi-sutou
Copy link
Owner

masashi-sutou commented Jul 23, 2020

@masashi-sutou masashi-sutou added help wanted Extra attention is needed wontfix This will not be worked on and removed bug Something isn't working help wanted Extra attention is needed labels Jul 23, 2020
@ghenry
Copy link
Author

ghenry commented Jul 24, 2020

Thanks. I did that (delete my pub-cache), but still get:

rm -rf ~/.pub-cache/
rm -rf ~/development/flutter/.pub-cache/
flutter run

Running "flutter pub get" in SureVoIP-Talk...                      38.7s

The plugin `flutter_ios_voip_kit` doesn't have a main class defined in
.pub-cache/hosted/pub.dartlang.org/flutter_ios_voip_kit-0.0.4+1/android/src/main/java/netkeepingblog/flutter_ios_voip_kit/FlutterIOSVoIPKitPlugin.java or
.pub-cache/hosted/pub.dartlang.org/flutter_ios_voip_kit-0.0.4+1/android/src/main/kotlin/netkeepingblog/flutter_ios_voip_kit/FlutterIOSVoIPKitPlugin.kt. This is likely to due to an incorrect
`androidPackage: netkeepingblog.flutter_ios_voip_kit` or `mainClass` entry in the plugin's pubspec.yaml.
If you are the author of this plugin, fix the `androidPackage` entry or move the main class to any of locations used above. Otherwise, please contact the author of this plugin and consider using a different plugin in
the meanwhile.

@ghenry
Copy link
Author

ghenry commented Jul 24, 2020

Also tried:

flutter pub cache repair

@ghenry
Copy link
Author

ghenry commented Jul 24, 2020

Found it!!!! Typo:

/home/ghenry/.pub-cache/hosted/pub.dartlang.org/flutter_ios_voip_kit-0.0.4+1/android/src/main/java/netkeepingblog/flutter_ios_voip_kit/FlutterIOSVoIPKitPlugin.java
should be:

netkeepingblog/flutter_iOS_VoIP_kit so in your pubspec.yaml

swap this:

flutter:
  plugin:
    platforms:
      android:
        package: netkeepingblog.flutter_ios_voip_kit
        pluginClass: FlutterIOSVoIPKitPlugin
      ios:
        pluginClass: FlutterIOSVoIPKitPlugin

to

flutter:
  plugin:
    platforms:
      android:
        package: netkeepingblog.flutter_iOS_VoIP_kit
        pluginClass: FlutterIOSVoIPKitPlugin
      ios:
        pluginClass: FlutterIOSVoIPKitPlugin

Will that allow mixed case like that for a class/package name?

Thanks.

@ghenry
Copy link
Author

ghenry commented Jul 24, 2020

So simply, change flutter_ios_voip_kit to flutter_iOS_VoIP_kit in your pubspec.yaml and release a new version to https://pub.dev

Actually, after doing this edit, flutter run fails with:

/AndroidStudioProjects/SureVoIP-Talk/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java:27: error: package netkeepingblog.flutter_iOS_VoIP_kit does not exist
    flutterEngine.getPlugins().add(new netkeepingblog.flutter_iOS_VoIP_kit.FlutterIOSVoIPKitPlugin());
                                                                          ^
1 error                                                                 
                                                                        
FAILURE: Build failed with an exception.                                
                                                                        
* What went wrong:                                                      
Execution failed for task ':app:compileDebugJavaWithJavac'.    

So I think it's best you change the case of the folder containing the files or clean up the case throughout the project of flutter_iOS_VoIP_kit

Thanks.

@ghenry
Copy link
Author

ghenry commented Jul 24, 2020

The folder rename fixes this issue:

.pub-cache/hosted/pub.dartlang.org/flutter_ios_voip_kit-0.0.4+1/android/src/main/kotlin/netkeepingblog $ mv flutter_iOS_VoIP_kit/ flutter_ios_voip_kit/

Once you do that and publish a new version, we're all good.

@ghenry
Copy link
Author

ghenry commented Jul 24, 2020

I'll I didn't need to do this on macOS, the issue with Case is on Linux.

@ghenry
Copy link
Author

ghenry commented Oct 26, 2020

Any news? Still getting this:

The plugin `flutter_ios_voip_kit` doesn't have a main class defined in ~/.pub-cache/hosted/pub.dartlang.org/flutter_ios_voip_kit-0.0.4+1/android/src/main/java/netkeepingblog/flutter_ios_voip_kit/FlutterIOSVoIPKitPlugin.java or ~/.pub-cache/hosted/pub.dartlang.org/flutter_ios_voip_kit-0.0.4+1/android/src/main/kotlin/netkeepingblog/flutter_ios_voip_kit/FlutterIOSVoIPKitPlugin.kt. This is likely to due to an incorrect `androidPackage: netkeepingblog.flutter_ios_voip_kit` or `mainClass` entry in the plugin's pubspec.yaml.
If you are the author of this plugin, fix the `androidPackage` entry or move the main class to any of locations used above. Otherwise, please contact the author of this plugin and consider using a different plugin in the meanwhile. 

@ghenry
Copy link
Author

ghenry commented Oct 26, 2020

Doing this, as explained, resolves the issue

#11 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants