-
Notifications
You must be signed in to change notification settings - Fork 45
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
external_app_launcher: uses or overrides a deprecated API. #37
Comments
Same issue |
Having the same issue |
Same issue |
Same issue (on linux).
Removing the reference to external_app_launcher allows build to complete.
BTW: version 3.1.0 is also broken. |
I think it will resolved by this PR #39 |
Waiting for release 💕 |
I decided I did not want to wait any longer for a new release. I can confirm that changing
to
fixes the problem. Steps I used to verify this:
The PR #39 should be merged, and a new release produced. In the meantime, I'll be running off my fixed clone. |
For a "fix" to other packages with the same problem, see also flutter/flutter#153281 (comment) TLDR; in your flutter project, in android\build.gradle, add this code before the other subprojects {
afterEvaluate { project ->
if (project.extensions.findByName("android") != null) {
Integer pluginCompileSdk = project.android.compileSdk
if (pluginCompileSdk != null && pluginCompileSdk < 31) {
project.logger.error(
"Warning: Overriding compileSdk version in Flutter plugin: "
+ project.name
+ " from "
+ pluginCompileSdk
+ " to 31 (to work around https://issuetracker.google.com/issues/199180389)."
+ "\nIf there is not a new version of " + project.name + ", consider filing an issue against "
+ project.name
+ " to increase their compileSdk to the latest (otherwise try updating to the latest version)."
)
project.android {
compileSdk 31
}
}
}
}
} |
Hi All, Thanks for your patience and support. |
Hey, thanks for getting right on it. Version 4.0.1 compiles and works.
However, there are still warnings which (after upgrading to the latest
android-studio (2024.2.1.12) and bringing my tool up to date, I still
get the following errors (though it compiles and works)
warning: [options] source value 8 is obsolete and will be removed in a
future release
warning: [options] target value 8 is obsolete and will be removed in a
future release
warning: [options] To suppress warnings about obsolete options, use -
Xlint:-options.
Note: /home/lab/.pub-cache/hosted/pub.dev/external_app_launcher-
4.0.1/android/src/main/java/com/example/launchexternalapp/Launchexterna
lappPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
I have isolated this to external_app_launcher, by removing it from my
project, and my project compiles cleanly.
What I can't figure out is where external_app_launcher is using the
deprecated API. I've hacked bit to no avail.
Here is my current flutter doctor -v output:
[✓] Flutter (Channel stable, 3.24.5, on Debian GNU/Linux 12 (bookworm)
6.1.0-13-amd64, locale en_US.UTF-8)
• Flutter version 3.24.5 on channel stable at /home/lab/devel/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision dec2ee5c1f (4 weeks ago), 2024-11-13 11:13:06 -
0800
• Engine revision a18df97ca5
• Dart version 3.5.4
• DevTools version 2.37.3
[✓] Android toolchain - develop for Android devices (Android SDK
version 35.0.0)
• Android SDK at /home/lab/Android/Sdk
• Platform android-35, build-tools 35.0.0
• ANDROID_HOME = /home/lab/Android/Sdk
• Java binary at: /home/lab/devel/android-studio/jbr/bin/java
• Java version OpenJDK Runtime Environment (build 21.0.3+-12282718-
b509.11)
• All Android licenses accepted.
[✓] Chrome - develop for the web
• Chrome at google-chrome
[✓] Linux toolchain - develop for Linux desktop
• Debian clang version 14.0.6
• cmake version 3.25.1
• ninja version 1.11.1
• pkg-config version 1.8.1
[✓] Android Studio (version 2024.2)
• Android Studio at /home/lab/devel/android-studio
• Flutter plugin version 83.0.3
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 21.0.3+-12282718-
b509.11)
[✓] VS Code (version 1.95.3)
• VS Code at /usr/share/code
• Flutter extension can be installed from:
🔨
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[✓] Connected device (3 available)
• sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64 • Android
14 (API 34) (emulator)
• Linux (desktop) • linux • linux-x64 • Debian GNU/Linux 12 (bookworm)
6.1.0-13-amd64
• Chrome (web) • chrome • web-javascript • Google Chrome 131.0.6778.108
[✓] Network resources
• All expected network resources are available.
• No issues found!
[✓] Flutter (Channel stable, 3.24.5, on Debian GNU/Linux 12 (bookworm)
6.1.0-13-amd64, locale en_US.UTF-8)
• Flutter version 3.24.5 on channel stable at
/home/lab/devel/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision dec2ee5c1f (4 weeks ago), 2024-11-13 11:13:06
-0800
• Engine revision a18df97ca5
• Dart version 3.5.4
• DevTools version 2.37.3
[✓] Android toolchain - develop for Android devices (Android SDK
version 35.0.0)
• Android SDK at /home/lab/Android/Sdk
• Platform android-35, build-tools 35.0.0
• ANDROID_HOME = /home/lab/Android/Sdk
• Java binary at: /home/lab/devel/android-studio/jbr/bin/java
• Java version OpenJDK Runtime Environment (build 21.0.3+-12282718-
b509.11)
• All Android licenses accepted.
[✓] Chrome - develop for the web
• Chrome at google-chrome
[✓] Linux toolchain - develop for Linux desktop
• Debian clang version 14.0.6
• cmake version 3.25.1
• ninja version 1.11.1
• pkg-config version 1.8.1
[✓] Android Studio (version 2024.2)
• Android Studio at /home/lab/devel/android-studio
• Flutter plugin version 83.0.3
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 21.0.3+-12282718-
b509.11)
[✓] VS Code (version 1.95.3)
• VS Code at /usr/share/code
• Flutter extension can be installed from:
🔨 https://marketplace.visualstudio.com/items?itemName=Dart-
Code.flutter
[✓] Connected device (3 available)
• sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64 •
Android 14 (API 34) (emulator)
• Linux (desktop) • linux • linux-x64 •
Debian GNU/Linux 12 (bookworm) 6.1.0-13-amd64
• Chrome (web) • chrome • web-javascript •
Google Chrome 131.0.6778.108
[✓] Network resources
• All expected network resources are available.
• No issues found!
…On Mon, 2024-12-09 at 21:52 -0800, Ruchika Gupta wrote:
Hi All,
This issue has been resolved in the latest release. Please update to
version 4.0.1 to see the fix. Let us know if you encounter any
further issues.
Thanks for your patience and support.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID:
***@***.***>
|
Hey Ruchika,
I think the warnings I'm now getting can be "fixed" by addressing this
issue: #38
This has been open since August. The next stable release of Flutter is
going to break external_app_launcher if this issue is not resolved.
grep -R registerWith .
from the root directory of the plugin will find offending code:
./example/android/app/src/main/java/io/flutter/plugins/GeneratedPluginR
egistrant.java: public static void ***@***.*** FlutterEngine
flutterEngine) {
./example/ios/Runner/GeneratedPluginRegistrant.m:+
(void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry {
./example/ios/Runner/GeneratedPluginRegistrant.m:
[LaunchexternalappPlugin registerWithRegistrar:[registry
registrarForPlugin:@"LaunchexternalappPlugin"]];
./example/ios/Runner/GeneratedPluginRegistrant.h:+
(void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry;
./android/src/main/java/com/example/launchexternalapp/Launchexternalapp
Plugin.java: public static void registerWith(Registrar registrar) {
grep:
./android/bin/src/main/java/com/example/launchexternalapp/LaunchVpnPlug
in.class: binary file matches
./android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistran
t.java: public static void registerWith(PluginRegistry registry) {
./android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistran
t.java:
LaunchVpnPlugin.registerWith(registry.registrarFor("com.geekyants.launc
h_vpn.LaunchVpnPlugin"));
./ios/Classes/LaunchexternalappPlugin.m:+
(void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registra
r
{./example/android/app/src/main/java/io/flutter/plugins/GeneratedPlugin
Registrant.java: public static void ***@***.***
FlutterEngine flutterEngine) {
Lincoln
…On Tue, 2024-12-10 at 14:54 -0500, Lincoln A Baxter wrote:
Hey, thanks for getting right on it. Version 4.0.1 compiles and
works.
However, there are still warnings which (after upgrading to the
latest android-studio (2024.2.1.12) and bringing my tool up to date,
I still get the following errors (though it compiles and works)
warning: [options] source value 8 is obsolete and will be removed in
a future release
warning: [options] target value 8 is obsolete and will be removed in
a future release
warning: [options] To suppress warnings about obsolete options, use -
Xlint:-options.
Note: /home/lab/.pub-cache/hosted/pub.dev/external_app_launcher-
4.0.1/android/src/main/java/com/example/launchexternalapp/Launchexter
nalappPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
I have isolated this to external_app_launcher, by removing it from my
project, and my project compiles cleanly.
What I can't figure out is where external_app_launcher is using the
deprecated API. I've hacked bit to no avail.
Here is my current flutter doctor -v output:
[✓] Flutter (Channel stable, 3.24.5, on Debian GNU/Linux 12
(bookworm) 6.1.0-13-amd64, locale en_US.UTF-8)
• Flutter version 3.24.5 on channel stable at /home/lab/devel/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision dec2ee5c1f (4 weeks ago), 2024-11-13 11:13:06 -
0800
• Engine revision a18df97ca5
• Dart version 3.5.4
• DevTools version 2.37.3
[✓] Android toolchain - develop for Android devices (Android SDK
version 35.0.0)
• Android SDK at /home/lab/Android/Sdk
• Platform android-35, build-tools 35.0.0
• ANDROID_HOME = /home/lab/Android/Sdk
• Java binary at: /home/lab/devel/android-studio/jbr/bin/java
• Java version OpenJDK Runtime Environment (build 21.0.3+-12282718-
b509.11)
• All Android licenses accepted.
[✓] Chrome - develop for the web
• Chrome at google-chrome
[✓] Linux toolchain - develop for Linux desktop
• Debian clang version 14.0.6
• cmake version 3.25.1
• ninja version 1.11.1
• pkg-config version 1.8.1
[✓] Android Studio (version 2024.2)
• Android Studio at /home/lab/devel/android-studio
• Flutter plugin version 83.0.3
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 21.0.3+-12282718-
b509.11)
[✓] VS Code (version 1.95.3)
• VS Code at /usr/share/code
• Flutter extension can be installed from:
🔨
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[✓] Connected device (3 available)
• sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64 •
Android 14 (API 34) (emulator)
• Linux (desktop) • linux • linux-x64 • Debian GNU/Linux 12
(bookworm) 6.1.0-13-amd64
• Chrome (web) • chrome • web-javascript • Google Chrome
131.0.6778.108
[✓] Network resources
• All expected network resources are available.
• No issues found!
[✓] Flutter (Channel stable, 3.24.5, on Debian GNU/Linux 12
(bookworm) 6.1.0-13-amd64, locale en_US.UTF-8)
• Flutter version 3.24.5 on channel stable at
/home/lab/devel/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision dec2ee5c1f (4 weeks ago), 2024-11-13
11:13:06 -0800
• Engine revision a18df97ca5
• Dart version 3.5.4
• DevTools version 2.37.3
[✓] Android toolchain - develop for Android devices (Android SDK
version 35.0.0)
• Android SDK at /home/lab/Android/Sdk
• Platform android-35, build-tools 35.0.0
• ANDROID_HOME = /home/lab/Android/Sdk
• Java binary at: /home/lab/devel/android-studio/jbr/bin/java
• Java version OpenJDK Runtime Environment (build 21.0.3+-
12282718-b509.11)
• All Android licenses accepted.
[✓] Chrome - develop for the web
• Chrome at google-chrome
[✓] Linux toolchain - develop for Linux desktop
• Debian clang version 14.0.6
• cmake version 3.25.1
• ninja version 1.11.1
• pkg-config version 1.8.1
[✓] Android Studio (version 2024.2)
• Android Studio at /home/lab/devel/android-studio
• Flutter plugin version 83.0.3
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 21.0.3+-
12282718-b509.11)
[✓] VS Code (version 1.95.3)
• VS Code at /usr/share/code
• Flutter extension can be installed from:
🔨 https://marketplace.visualstudio.com/items?itemName=Dart-
Code.flutter
[✓] Connected device (3 available)
• sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64 •
Android 14 (API 34) (emulator)
• Linux (desktop) • linux • linux-x64 •
Debian GNU/Linux 12 (bookworm) 6.1.0-13-amd64
• Chrome (web) • chrome • web-javascript •
Google Chrome 131.0.6778.108
[✓] Network resources
• All expected network resources are available.
• No issues found!
On Mon, 2024-12-09 at 21:52 -0800, Ruchika Gupta wrote:
> Hi All,
> This issue has been resolved in the latest release. Please update
> to version 4.0.1 to see the fix. Let us know if you encounter any
> further issues.
> Thanks for your patience and support.
> —
> Reply to this email directly, view it on GitHub, or unsubscribe.
> You are receiving this because you commented.Message ID:
> ***@***.***>
|
Please fix this issue I still get this warning in the latest version 4.0.1:
|
Note: C:\Users\vrica\AppData\Local\Pub\Cache\hosted\pub.dev\external_app_launcher-4.0.0\android\src\main\java\com\example\launchexternalapp\LaunchexternalappPlugin.java uses or overrides a deprecated API.
Flutter 3.19.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision ba39319843 (7 weeks ago) • 2024-03-07 15:22:21 -0600
Engine • revision 2e4ba9c6fb
Tools • Dart 3.3.1 • DevTools 2.31.1
Please! What I have to do?
The text was updated successfully, but these errors were encountered: