ponnamkarthik / FlutterHtmlView

Flutter Plugin to render html as a Widget
Apache License 2.0
241 stars 107 forks source link

error with flutter_custom_tabs #76

Open hahn opened 5 years ago

hahn commented 5 years ago

after update library to 0.5.11, I get error with flutter_custom_tabs

/Users/anu/app/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_custom_tabs-0.4.0/android/src/main/java/com/github/droibit/flutter/plugins/customtabs/internal/Launcher.java:6: error: package android.support.annotation does not exist
import android.support.annotation.AnimRes;
                                 ^
/Users/anu/app/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_custom_tabs-0.4.0/android/src/main/java/com/github/droibit/flutter/plugins/customtabs/internal/Launcher.java:7: error: package android.support.annotation does not exist
import android.support.annotation.NonNull;
                                 ^
/Users/anu/app/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_custom_tabs-0.4.0/android/src/main/java/com/github/droibit/flutter/plugins/customtabs/internal/Launcher.java:8: error: package android.support.annotation does not exist
import android.support.annotation.Nullable;
                                 ^
/Users/anu/app/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_custom_tabs-0.4.0/android/src/main/java/com/github/droibit/flutter/plugins/customtabs/internal/Launcher.java:9: error: package android.support.annotation does not exist
import android.support.annotation.RestrictTo;
                                 ^
/Users/anu/app/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_custom_tabs-0.4.0/android/src/main/java/com/github/droibit/flutter/plugins/customtabs/internal/Launcher.java:10: error: cannot find symbol
import android.support.customtabs.CustomTabsIntent;
                                 ^
  symbol:   class CustomTabsIntent
  location: package android.support.customtabs
/Users/anu/app/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_custom_tabs-0.4.0/android/src/main/java/com/github/droibit/flutter/plugins/customtabs/internal/Launcher.java:19: error: cannot find symbol
@RestrictTo(RestrictTo.Scope.LIBRARY) public class Launcher {
 ^
  symbol: class RestrictTo
/Users/anu/app/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_custom_tabs-0.4.0/android/src/main/java/com/github/droibit/flutter/plugins/customtabs/internal/Launcher.java:43: error: cannot find symbol
  public CustomTabsIntent buildIntent(@NonNull Map<String, Object> options) {
         ^
  symbol:   class CustomTabsIntent
  location: class Launcher
/Users/anu/app/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_custom_tabs-0.4.0/android/src/main/java/com/github/droibit/flutter/plugins/customtabs/internal/Launcher.java:74: error: package CustomTabsIntent does not exist
  private void applyAnimations(@NonNull CustomTabsIntent.Builder builder,
                                                        ^
/Users/anu/app/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_custom_tabs-0.4.0/android/src/main/java/com/github/droibit/flutter/plugins/customtabs/internal/Launcher.java:107: error: cannot find symbol
      @NonNull CustomTabsIntent customTabsIntent, @Nullable List<String> extraCustomTabs) {
               ^
  symbol:   class CustomTabsIntent
  location: class Launcher
/Users/anu/app/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_custom_tabs-0.4.0/android/src/main/java/com/github/droibit/flutter/plugins/customtabs/CustomTabsPlugin.java:7: error: package android.support.annotation does not exist
import android.support.annotation.NonNull;
                                 ^
/Users/anu/app/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_custom_tabs-0.4.0/android/src/main/java/com/github/droibit/flutter/plugins/customtabs/CustomTabsPlugin.java:8: error: cannot find symbol
import android.support.customtabs.CustomTabsIntent;
                                 ^
  symbol:   class CustomTabsIntent
  location: package android.support.customtabs
/Users/anu/app/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_custom_tabs-0.4.0/android/src/main/java/com/github/droibit/flutter/plugins/customtabs/internal/Launcher.java:38: error: cannot find symbol
  public Launcher(@NonNull Context context) {
                   ^
  symbol:   class NonNull
  location: class Launcher
/Users/anu/app/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_custom_tabs-0.4.0/android/src/main/java/com/github/droibit/flutter/plugins/customtabs/internal/Launcher.java:43: error: cannot find symbol
  public CustomTabsIntent buildIntent(@NonNull Map<String, Object> options) {
                                       ^
  symbol:   class NonNull
  location: class Launcher
/Users/anu/app/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_custom_tabs-0.4.0/android/src/main/java/com/github/droibit/flutter/plugins/customtabs/internal/Launcher.java:42: error: cannot find symbol
  @SuppressWarnings("unchecked") @NonNull
                                  ^
  symbol:   class NonNull
  location: class Launcher
/Users/anu/app/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_custom_tabs-0.4.0/android/src/main/java/com/github/droibit/flutter/plugins/customtabs/internal/Launcher.java:74: error: cannot find symbol
  private void applyAnimations(@NonNull CustomTabsIntent.Builder builder,
                                ^
  symbol:   class NonNull
  location: class Launcher
/Users/anu/app/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_custom_tabs-0.4.0/android/src/main/java/com/github/droibit/flutter/plugins/customtabs/internal/Launcher.java:75: error: cannot find symbol
      @NonNull Map<String, String> animations) {
       ^
  symbol:   class NonNull
  location: class Launcher
/Users/anu/app/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_custom_tabs-0.4.0/android/src/main/java/com/github/droibit/flutter/plugins/customtabs/internal/Launcher.java:98: error: cannot find symbol
  @AnimRes private int resolveAnimationIdentifierIfNeeded(@NonNull String identifier) {
                                                           ^
  symbol:   class NonNull
  location: class Launcher
/Users/anu/app/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_custom_tabs-0.4.0/android/src/main/java/com/github/droibit/flutter/plugins/customtabs/internal/Launcher.java:98: error: cannot find symbol
  @AnimRes private int resolveAnimationIdentifierIfNeeded(@NonNull String identifier) {
   ^
  symbol:   class AnimRes
  location: class Launcher
/Users/anu/app/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_custom_tabs-0.4.0/android/src/main/java/com/github/droibit/flutter/plugins/customtabs/internal/Launcher.java:106: error: cannot find symbol
  public void launch(@NonNull Context context, @NonNull Uri uri,
                      ^
  symbol:   class NonNull
  location: class Launcher
/Users/anu/app/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_custom_tabs-0.4.0/android/src/main/java/com/github/droibit/flutter/plugins/customtabs/internal/Launcher.java:106: error: cannot find symbol
  public void launch(@NonNull Context context, @NonNull Uri uri,
                                                ^
  symbol:   class NonNull
  location: class Launcher
/Users/anu/app/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_custom_tabs-0.4.0/android/src/main/java/com/github/droibit/flutter/plugins/customtabs/internal/Launcher.java:107: error: cannot find symbol
      @NonNull CustomTabsIntent customTabsIntent, @Nullable List<String> extraCustomTabs) {
       ^
  symbol:   class NonNull
  location: class Launcher
/Users/anu/app/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_custom_tabs-0.4.0/android/src/main/java/com/github/droibit/flutter/plugins/customtabs/internal/Launcher.java:107: error: cannot find symbol
      @NonNull CustomTabsIntent customTabsIntent, @Nullable List<String> extraCustomTabs) {
                                                   ^
  symbol:   class Nullable
  location: class Launcher
/Users/anu/app/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_custom_tabs-0.4.0/android/src/main/java/com/github/droibit/flutter/plugins/customtabs/CustomTabsPlugin.java:39: error: cannot find symbol
  private CustomTabsPlugin(@NonNull PluginRegistry.Registrar registrar) {
                            ^
  symbol:   class NonNull
  location: class CustomTabsPlugin
/Users/anu/app/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_custom_tabs-0.4.0/android/src/main/java/com/github/droibit/flutter/plugins/customtabs/CustomTabsPlugin.java:57: error: cannot find symbol
  private void launch(@NonNull Map<String, Object> args, @NonNull MethodChannel.Result result) {
                       ^
  symbol:   class NonNull
  location: class CustomTabsPlugin
/Users/anu/app/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_custom_tabs-0.4.0/android/src/main/java/com/github/droibit/flutter/plugins/customtabs/CustomTabsPlugin.java:57: error: cannot find symbol
  private void launch(@NonNull Map<String, Object> args, @NonNull MethodChannel.Result result) {
                                                          ^
  symbol:   class NonNull
  location: class CustomTabsPlugin
/Users/anu/app/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_custom_tabs-0.4.0/android/src/main/java/com/github/droibit/flutter/plugins/customtabs/internal/Launcher.java:44: error: package CustomTabsIntent does not exist
    final CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder();
                          ^
/Users/anu/app/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_custom_tabs-0.4.0/android/src/main/java/com/github/droibit/flutter/plugins/customtabs/internal/Launcher.java:44: error: package CustomTabsIntent does not exist
    final CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder();
                                                                 ^
/Users/anu/app/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_custom_tabs-0.4.0/android/src/main/java/com/github/droibit/flutter/plugins/customtabs/CustomTabsPlugin.java:60: error: cannot find symbol
    final CustomTabsIntent customTabsIntent = launcher.buildIntent(options);
          ^
  symbol:   class CustomTabsIntent
  location: class CustomTabsPlugin
28 errors

FAILURE: Build failed with an exception.
arsenioo commented 5 years ago

Have the same problem. May it be related to androidx libraries migration?

lisional commented 5 years ago

I got the same errors. Migrating my project to AndroidX fixed the issue. In gradle.properties make sure you got: android.enableJetifier=true

It handles the merge between AndroidX and non-AndroidX deps.

hahn commented 5 years ago

@lisional remove that line solved this error for me. But now error in other libraries~ (and yes, it's because AndroidX)

HenriqueWojcik commented 5 years ago

same problem here. this package is a shit.