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

Cannot find symbol CustomTabsFallback with version 1.1.0 and 1.1.1 #84

Closed
luckyhandler opened this issue Sep 8, 2023 · 6 comments · Fixed by #101 or #82
Closed

Cannot find symbol CustomTabsFallback with version 1.1.0 and 1.1.1 #84

luckyhandler opened this issue Sep 8, 2023 · 6 comments · Fixed by #101 or #82

Comments

@luckyhandler
Copy link

luckyhandler commented Sep 8, 2023

I upgraded my dependencies yesterday and cannot build the project unless I revert the upgrade for flutter_custom_tabs.
The following error is shown during the build process for Android:

/Users/user/.pub-cache/hosted/pub.dev/flutter_custom_tabs-1.1.1/android/src/main/java/com/github/droibit/flutter/plugins/customtabs/CustomTabsFactory.java:135: error: cannot find symbol
        final CustomTabsFallback fallback;
              ^
  symbol:   class CustomTabsFallback
  location: class CustomTabsFactory
/Users/user/.pub-cache/hosted/pub.dev/flutter_custom_tabs-1.1.1/android/src/main/java/com/github/droibit/flutter/plugins/customtabs/CustomTabsFactory.java:137: error: package CustomTabsLauncher does not exist
            fallback = new CustomTabsLauncher.LaunchNonChromeCustomTabs(extraCustomTabs);
                                             ^
/Users/user/.pub-cache/hosted/pub.dev/flutter_custom_tabs-1.1.1/android/src/main/java/com/github/droibit/flutter/plugins/customtabs/CustomTabsFactory.java:139: error: package CustomTabsLauncher does not exist
            fallback = new CustomTabsLauncher.LaunchNonChromeCustomTabs(context);
                                             ^
/Users/user/.pub-cache/hosted/pub.dev/flutter_custom_tabs-1.1.1/android/src/main/java/com/github/droibit/flutter/plugins/customtabs/CustomTabsPlugin.java:96: error: cannot find symbol
            final CustomTabsFallback fallback = factory.createFallback(options);
                  ^
  symbol:   class CustomTabsFallback
  location: class CustomTabsPlugin
/Users/user/.pub-cache/hosted/pub.dev/flutter_custom_tabs-1.1.1/android/src/main/java/com/github/droibit/flutter/plugins/customtabs/CustomTabsPlugin.java:97: error: cannot find symbol
            CustomTabsLauncher.launch(activity, customTabsIntent, uri, fallback);
            ^

for iOS the issue is:

Modules Issue (Xcode): Declaration of 'CustomTabsPlugin' must be imported from module 'flutter_custom_tabs.Swift' before it is required
/app/ios/Runner/GeneratedPluginRegistrant.m:255:3

Could not build the application for the simulator.
Error launching application on iPhone 14 Pro Max.

Neither running dart pub cache repair nor dart pub cache clean did solve the issue.

Only downgrading to flutter_custom_tabs: 1.0.4 solves the issue for now.

@luckyhandler luckyhandler changed the title cannot find symbol CustomTabsFallback with version 1.1.0 and 1.1.1 Cannot find symbol CustomTabsFallback with version 1.1.0 and 1.1.1 Sep 8, 2023
@droibit
Copy link
Owner

droibit commented Sep 9, 2023

It seems that the difference between the Kotlin version that your project and this package of v1.11.1
depend on is the cause of that error.

Please update the package to the latest version v1.12.0 and check the latest requirements.

If the error is still not resolved, please provide a minimal reproduction sample.

@SputNikPlop
Copy link
Contributor

I get the error as well even on v1.2.0 on iOS muxable/rtchat#1059

Modules Issue (Xcode): Declaration of 'CustomTabsPlugin' must be imported from module
'flutter_custom_tabs.Swift' before it is required
/Users/dev/Developer/rtchat/ios/Runner/GeneratedPluginRegistrant.m:165:3


Could not build the application for the simulator.
Error launching application on iPhone SE (3rd generation).

@droibit
Copy link
Owner

droibit commented Sep 16, 2023

Hi @SputNikPlop,

I just released flutter_custom_tabs v1.2.1 to pub.dev.

Can you please try updating the plugin to see if it fixes the build error?

@SputNikPlop
Copy link
Contributor

SputNikPlop commented Sep 16, 2023

Can you please try updating the plugin to see if it fixes the build error?

The fix did indeed fix the build error. Thank you!

@droibit
Copy link
Owner

droibit commented Sep 16, 2023

Great to hear that!

Please let me know if you have any other feedback.

@droibit droibit closed this as completed Sep 16, 2023
@luckyhandler
Copy link
Author

working on my side as well with 1.2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants