MertcanDinler / Flutter-Advanced-Share

Flutter plugin for sharing
MIT License
32 stars 23 forks source link

package io.flutter.plugin.common.PluginRegistry does not exist #10

Closed karnadii closed 5 years ago

karnadii commented 5 years ago
Launching lib/main.dart on Redmi Note 3 in debug mode...
Initializing gradle...                                       2.5s
Resolving dependencies...                                    6.6s
Gradle task 'assembleDebug'...                                   
Picked up _JAVA_OPTIONS:   -Dawt.useSystemAAFontSettings=gasp
/home/karnadi/Android/flutter/.pub-cache/hosted/pub.dartlang.org/advanced_share-0.1.0/android/src/main/java/in/mertcan/advancedshare/FileHelper.java:3: error: package io.flutter.plugin.common.PluginRegistry does not exist
import io.flutter.plugin.common.PluginRegistry.Registrar;
                                              ^
/home/karnadi/Android/flutter/.pub-cache/hosted/pub.dartlang.org/advanced_share-0.1.0/android/src/main/java/in/mertcan/advancedshare/FileHelper.java:18: error: cannot find symbol
    private final Registrar registrar;
                  ^
  symbol:   class Registrar
  location: class FileHelper
/home/karnadi/Android/flutter/.pub-cache/hosted/pub.dartlang.org/advanced_share-0.1.0/android/src/main/java/in/mertcan/advancedshare/FileHelper.java:25: error: cannot find symbol
    public FileHelper(Registrar registrar, String url) {
                      ^
  symbol:   class Registrar
  location: class FileHelper
/home/karnadi/Android/flutter/.pub-cache/hosted/pub.dartlang.org/advanced_share-0.1.0/android/src/main/java/in/mertcan/advancedshare/FileHelper.java:32: error: cannot find symbol
    public FileHelper(Registrar registrar, String url, String type) {
                      ^
  symbol:   class Registrar
  location: class FileHelper
/home/karnadi/Android/flutter/.pub-cache/hosted/pub.dartlang.org/advanced_share-0.1.0/android/src/main/java/in/mertcan/advancedshare/AdvancedSharePlugin.java:3: error: package io.flutter.plugin.common does not exist
import io.flutter.plugin.common.MethodChannel;
                               ^
/home/karnadi/Android/flutter/.pub-cache/hosted/pub.dartlang.org/advanced_share-0.1.0/android/src/main/java/in/mertcan/advancedshare/AdvancedSharePlugin.java:4: error: package io.flutter.plugin.common.MethodChannel does not exist
import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
                                             ^
/home/karnadi/Android/flutter/.pub-cache/hosted/pub.dartlang.org/advanced_share-0.1.0/android/src/main/java/in/mertcan/advancedshare/AdvancedSharePlugin.java:5: error: package io.flutter.plugin.common.MethodChannel does not exist
import io.flutter.plugin.common.MethodChannel.Result;
                                             ^
/home/karnadi/Android/flutter/.pub-cache/hosted/pub.dartlang.org/advanced_share-0.1.0/android/src/main/java/in/mertcan/advancedshare/AdvancedSharePlugin.java:6: error: package io.flutter.plugin.common does not exist
import io.flutter.plugin.common.MethodCall;
                               ^
/home/karnadi/Android/flutter/.pub-cache/hosted/pub.dartlang.org/advanced_share-0.1.0/android/src/main/java/in/mertcan/advancedshare/AdvancedSharePlugin.java:7: error: package io.flutter.plugin.common.PluginRegistry does not exist
import io.flutter.plugin.common.PluginRegistry.Registrar;
                                              ^
/home/karnadi/Android/flutter/.pub-cache/hosted/pub.dartlang.org/advanced_share-0.1.0/android/src/main/java/in/mertcan/advancedshare/AdvancedSharePlugin.java:20: error: cannot find symbol
public class AdvancedSharePlugin implements MethodCallHandler {
                                            ^
  symbol: class MethodCallHandler
/home/karnadi/Android/flutter/.pub-cache/hosted/pub.dartlang.org/advanced_share-0.1.0/android/src/main/java/in/mertcan/advancedshare/AdvancedSharePlugin.java:22: error: cannot find symbol
  private final Registrar _registrar;
                ^
  symbol:   class Registrar
  location: class AdvancedSharePlugin
/home/karnadi/Android/flutter/.pub-cache/hosted/pub.dartlang.org/advanced_share-0.1.0/android/src/main/java/in/mertcan/advancedshare/shareintents/Base.java:3: error: package io.flutter.plugin.common.PluginRegistry does not exist
import io.flutter.plugin.common.PluginRegistry.Registrar;
                                              ^
/home/karnadi/Android/flutter/.pub-cache/hosted/pub.dartlang.org/advanced_share-0.1.0/android/src/main/java/in/mertcan/advancedshare/AdvancedSharePlugin.java:25: error: cannot find symbol
  private AdvancedSharePlugin(Registrar registrar) {
                              ^
  symbol:   class Registrar
  location: class AdvancedSharePlugin
/home/karnadi/Android/flutter/.pub-cache/hosted/pub.dartlang.org/advanced_share-0.1.0/android/src/main/java/in/mertcan/advancedshare/AdvancedSharePlugin.java:32: error: cannot find symbol
  public static void registerWith(Registrar registrar) {
                                  ^
  symbol:   class Registrar
  location: class AdvancedSharePlugin
/home/karnadi/Android/flutter/.pub-cache/hosted/pub.dartlang.org/advanced_share-0.1.0/android/src/main/java/in/mertcan/advancedshare/AdvancedSharePlugin.java:40: error: cannot find symbol
  public void onMethodCall(MethodCall call, Result result) {
                           ^
  symbol:   class MethodCall
  location: class AdvancedSharePlugin
/home/karnadi/Android/flutter/.pub-cache/hosted/pub.dartlang.org/advanced_share-0.1.0/android/src/main/java/in/mertcan/advancedshare/AdvancedSharePlugin.java:40: error: cannot find symbol
  public void onMethodCall(MethodCall call, Result result) {
                                            ^
  symbol:   class Result
  location: class AdvancedSharePlugin
/home/karnadi/Android/flutter/.pub-cache/hosted/pub.dartlang.org/advanced_share-0.1.0/android/src/main/java/in/mertcan/advancedshare/shareintents/Base.java:12: error: cannot find symbol
    protected final Registrar registrar;
                    ^
  symbol:   class Registrar
  location: class Base
/home/karnadi/Android/flutter/.pub-cache/hosted/pub.dartlang.org/advanced_share-0.1.0/android/src/main/java/in/mertcan/advancedshare/shareintents/Base.java:18: error: cannot find symbol
    public Base(Registrar registrar) {
                ^
  symbol:   class Registrar
  location: class Base
/home/karnadi/Android/flutter/.pub-cache/hosted/pub.dartlang.org/advanced_share-0.1.0/android/src/main/java/in/mertcan/advancedshare/shareintents/Whatsapp.java:5: error: package io.flutter.plugin.common.PluginRegistry does not exist
import io.flutter.plugin.common.PluginRegistry.Registrar;
                                              ^
/home/karnadi/Android/flutter/.pub-cache/hosted/pub.dartlang.org/advanced_share-0.1.0/android/src/main/java/in/mertcan/advancedshare/shareintents/SingleBase.java:5: error: package io.flutter.plugin.common.PluginRegistry does not exist
import io.flutter.plugin.common.PluginRegistry.Registrar;
                                              ^
/home/karnadi/Android/flutter/.pub-cache/hosted/pub.dartlang.org/advanced_share-0.1.0/android/src/main/java/in/mertcan/advancedshare/shareintents/Whatsapp.java:12: error: cannot find symbol
    public Whatsapp(Registrar registrar) {
                    ^
  symbol:   class Registrar
  location: class Whatsapp
/home/karnadi/Android/flutter/.pub-cache/hosted/pub.dartlang.org/advanced_share-0.1.0/android/src/main/java/in/mertcan/advancedshare/shareintents/SingleBase.java:13: error: cannot find symbol
    public SingleBase(Registrar registrar) {
                      ^
  symbol:   class Registrar
  location: class SingleBase
/home/karnadi/Android/flutter/.pub-cache/hosted/pub.dartlang.org/advanced_share-0.1.0/android/src/main/java/in/mertcan/advancedshare/shareintents/Gmail.java:5: error: package io.flutter.plugin.common.PluginRegistry does not exist
import io.flutter.plugin.common.PluginRegistry.Registrar;
                                              ^
/home/karnadi/Android/flutter/.pub-cache/hosted/pub.dartlang.org/advanced_share-0.1.0/android/src/main/java/in/mertcan/advancedshare/shareintents/Gmail.java:10: error: cannot find symbol
    public Gmail(Registrar registrar) {
                 ^
  symbol:   class Registrar
  location: class Gmail
/home/karnadi/Android/flutter/.pub-cache/hosted/pub.dartlang.org/advanced_share-0.1.0/android/src/main/java/in/mertcan/advancedshare/shareintents/Generic.java:5: error: package io.flutter.plugin.common.PluginRegistry does not exist
import io.flutter.plugin.common.PluginRegistry.Registrar;
                                              ^
/home/karnadi/Android/flutter/.pub-cache/hosted/pub.dartlang.org/advanced_share-0.1.0/android/src/main/java/in/mertcan/advancedshare/shareintents/Generic.java:10: error: cannot find symbol
    public Generic(Registrar registrar) {
                   ^
  symbol:   class Registrar
  location: class Generic
/home/karnadi/Android/flutter/.pub-cache/hosted/pub.dartlang.org/advanced_share-0.1.0/android/src/main/java/in/mertcan/advancedshare/AdvancedSharePlugin.java:33: error: cannot find symbol
    final MethodChannel channel = new MethodChannel(registrar.messenger(), CHANNEL);
          ^
  symbol:   class MethodChannel
  location: class AdvancedSharePlugin
/home/karnadi/Android/flutter/.pub-cache/hosted/pub.dartlang.org/advanced_share-0.1.0/android/src/main/java/in/mertcan/advancedshare/AdvancedSharePlugin.java:33: error: cannot find symbol
    final MethodChannel channel = new MethodChannel(registrar.messenger(), CHANNEL);
                                      ^
  symbol:   class MethodChannel
  location: class AdvancedSharePlugin
/home/karnadi/Android/flutter/.pub-cache/hosted/pub.dartlang.org/advanced_share-0.1.0/android/src/main/java/in/mertcan/advancedshare/AdvancedSharePlugin.java:39: error: method does not override or implement a method from a supertype
  @Override
  ^
29 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':advanced_share:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 5s
         *********************************************************
WARNING: This version of firebase_admob will break your Android build if it or its dependencies aren't compatible with AndroidX.
         See https://goo.gl/CP92wY for more information on the problem and how to fix it.
         This warning prints for all Android build failures. The real root cause of the error may be unrelated.
         *********************************************************

Gradle task 'assembleDebug'... Done                          7.0s
Gradle task assembleDebug failed with exit code 1
zsh: exit 1     flutter run
flutter run  21.16s user 3.72s system 84% cpu 29.296 total
MattL-NZ commented 5 years ago

@karnadii I see you closed this issue. Can you please advise how you fixed this?

karnadii commented 5 years ago

@MattL-NZ I'm sorry I think I forget what have I done to fix this issue, from my git commit history i can see that maybe disable minify and proguard, and upgrade to androidx, try it if it work. Hope it help.