Open ghenry opened 4 years ago
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.
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.
Also tried:
flutter pub cache repair
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.
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.
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.
I'll I didn't need to do this on macOS, the issue with Case is on Linux.
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.
Doing this, as explained, resolves the issue
https://github.com/masashi-sutou/flutter_ios_voip_kit/issues/11#issuecomment-663613924