flutter_keyboard_visibility icon indicating copy to clipboard operation
flutter_keyboard_visibility copied to clipboard

Package does not exists - android

Open aravindhkumar23 opened this issue 5 years ago • 7 comments

I am facing this issue today

/Users/aravindhkumar/Projects/work_test/testapp/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java:5: error: cannot find symbol
import com.github.adee42.keyboardvisibility.KeyboardVisibilityPlugin;
                                           ^
  symbol:   class KeyboardVisibilityPlugin
  location: package com.github.adee42.keyboardvisibility

/Users/aravindhkumar/Projects/work_test/testapp/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java:19: error: cannot find symbol
    KeyboardVisibilityPlugin.registerWith(registry.registrarFor("com.github.adee42.keyboardvisibility.KeyboardVisibilityPlugin"));
    ^
  symbol:   variable KeyboardVisibilityPlugin
  location: class GeneratedPluginRegistrant

can anyone help me to solve with this? I need to deploy the app to play store?

aravindhkumar23 avatar May 08 '19 10:05 aravindhkumar23

How did you register the plugin? Did you register it in the pubspec.yaml file and ran the "flutter packages get" command as described in the installation procedure?

Installing Keyboard Visibility Plugin

adee42 avatar May 09 '19 07:05 adee42

It works if I use

keyboard_visibility: 0.5.1

but when using

keyboard_visibility: ^0.5.1

It causes the error described.

so the problem may be with version 0.5.2

aravindhkumar23 avatar May 09 '19 07:05 aravindhkumar23

This is strange as the java file wasn't changed between version 0.5.1 and 0.5.2. I suspect the 0.5.2 version of the plugin in your cache might be broken. Can you delete it and try to download it again?

adee42 avatar May 09 '19 07:05 adee42

Tried By creating new Flutter Project and it works till I add the plugin, when plugin package gets added then the error shows up. currently using v-0.5.1 to get working without errors.

aravindhkumar23 avatar May 09 '19 07:05 aravindhkumar23

This won't help as flutter caches the plugins. Can you just delete the following directory and then run the "flutter get packages" command in your project?

<FLUTTER-DIR>/.pub-cache/hosted/pub.dartlang.org/keyboard_visibility-0.5.2

adee42 avatar May 09 '19 08:05 adee42

I just uploaded an updated version of the plugin (0.5.3). Can you check if it works with this one?

adee42 avatar May 09 '19 08:05 adee42

Ok, will check to update.

aravindhkumar23 avatar May 09 '19 08:05 aravindhkumar23