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

Plugin project :url_launcher_web not found. Please update settings.gradle. #57777

Closed
x4080 opened this issue May 22, 2020 · 15 comments
Closed

Plugin project :url_launcher_web not found. Please update settings.gradle. #57777

x4080 opened this issue May 22, 2020 · 15 comments

Comments

@x4080
Copy link

x4080 commented May 22, 2020

Hi after upgrading to latest url_launcher, this message appears when building/debugging android app

It seems to run ok but it appears

@TahaTesser
Copy link
Member

Hi @x4080
Please add in your flutter app -> android -> settings.gradle

def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()

def plugins = new Properties()
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
if (pluginsFile.exists()) {
    pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
}

plugins.each { name, path ->
    def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
    include ":$name"
    project(":$name").projectDir = pluginDirectory
}

Closing, as this isn't an issue with Flutter itself, if you disagree please write in the comments and I will reopen it
Thank you

@x4080
Copy link
Author

x4080 commented May 22, 2020

@TahaTesser thanks for the tip, I'll try it, where do you find that solution ? I tried finding the solution and can't find it anywhere

@x4080
Copy link
Author

x4080 commented May 22, 2020

@TahaTesser Yes it works, thanks a lot

@TahaTesser
Copy link
Member

duplicate of #46304

@edwinmendoza1999
Copy link

Hi @x4080 eso me ha funcionado sólo en "flutter run", pero no puedo crear un release de la apk cuando hago "flutter build apk --release" la consola dice "this is taking an unexpectedly long time", y finalmente arroja un error.
Y cuando pruebo el "app-debug.apk" en mi teléfono no logra instalarse.

@Nickkun
Copy link

Nickkun commented Jun 22, 2020

i was tried and show error below.

Note:` D:\Develop\flutter\.pub-cache\hosted\pub.dartlang.org\url_launcher-5.4.10\android\src\main\java\io\flutter\plugins\urllauncher\WebViewActivity.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details.

added: flutter doctor like below

    • Flutter version 1.17.3 at D:\Develop\flutter
    • Framework revision b041144f83 (3 weeks ago), 2020-06-04 09:26:11 -0700
    • Engine revision ee76268252
    • Dart version 2.8.4

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at C:\Users\JANG\AppData\Local\Android\sdk
    • Platform android-29, build-tools 29.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[√] Android Studio (version 4.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 46.0.2
    • Dart plugin version 193.7361
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] VS Code (version 1.45.0)
    • VS Code at C:\Users\JANG\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.11.0

[!] Connected device
    ! No devices available````

@Errechydy
Copy link

Errechydy commented Jun 22, 2020

@TahaTesser is there a solution for the deprecated warnning? i had the same error that Nickkun has.
Note: /Volumes/ER/_flutter-sdk/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.4.11/android/src/main/java/io/flutter/plugins/urllauncher/WebViewActivity.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details.

@singwithaashish
Copy link

same Note: D:\flutter.pub-cache\hosted\pub.dartlang.org\url_launcher-5.4.11\android\src\main\java\io\flutter\plugins\urllauncher\WebViewActivity.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details

@jims57
Copy link

jims57 commented Jun 24, 2020

Replace the whole file as follows, the bug should be fixed.

image

-------settings.gradle-----------
include ':app'

def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()

def plugins = new Properties()
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
if (pluginsFile.exists()) {
pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
}

plugins.each { name, path ->
def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
include ":$name"
project(":$name").projectDir = pluginDirectory
}

@Nickkun
Copy link

Nickkun commented Jun 25, 2020

Replace the whole file as follows, the bug should be fixed.

image

-------settings.gradle-----------
include ':app'

def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()

def plugins = new Properties()
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
if (pluginsFile.exists()) {
pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
}

plugins.each { name, path ->
def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
include ":$name"
project(":$name").projectDir = pluginDirectory
}

is this official method?

@Nickkun
Copy link

Nickkun commented Jun 25, 2020

@jims57 It Works for me! Thank you!

Running "flutter pub get" in PROJ1...                               2.5s
Launching lib\main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...
√ Built build\app\outputs\apk\debug\app-debug.apk.
Installing build\app\outputs\apk\app.apk...
Debug service listening on ws://127.0.0.1:3879/nsCb7X_MXDI=/ws
Syncing files to device Android SDK built for x86...
I/Choreographer( 3905): Skipped 63 frames!  The application may be doing too much work on its main thread.
D/EGL_emulation( 3905): eglMakeCurrent: 0xdb1841e0: ver 2 0 (tinfo 0xdb1832a0)
D/EGL_emulation( 3905): eglMakeCurrent: 0xdb184360: ver 2 0 (tinfo 0xdb183380)

@jims57
Copy link

jims57 commented Jun 29, 2020

is this official method?

@Nickkun You can say it is the official one, since it comes from @TahaTesser who is on the Flutter team. See this.

@6636345e
Copy link

ℹ️ I got errors even when I followed the instructions above so I noticed that include ':app' is missing, but it's importing then added it and everything worked well afterwards.

Copy code below and replace the whole content of settings.gradle

include ':app'

def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()

def plugins = new Properties()
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
if (pluginsFile.exists()) {
    pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
}

plugins.each { name, path ->
    def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
    include ":$name"
    project(":$name").projectDir = pluginDirectory
}

👍

@iamahmedshah
Copy link

iamahmedshah commented May 29, 2021

I did that and I get this error.

``Launching lib\main.dart on vivo 1906 in debug mode...

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:mergeExtDexDebug'.

Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Failed to transform kotlin-stdlib-jdk7-1.4.20.jar (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.20) to match attributes {artifactType=android-dex, dexing-enable-desugaring=true, dexing-incremental-transform=false, dexing-is-debuggable=true, dexing-min-sdk=29, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Execution failed for DexingNoClasspathTransform: C:\Users\Ahmed.gradle\caches\transforms-2\files-2.1\0feef71d76429d23d40b64fac9c1c3fb\jetified-kotlin-stdlib-jdk7-1.4.20.jar.
> Cannot parse result path string: ``

    Using VSCODE

@github-actions
Copy link

github-actions bot commented Aug 1, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants