'flutter can't build lunch_url gradle
i use url_launcher: ^6.0.20
in my project and I added queries in android manifest:
<queries>
<!-- If your app opens https URLs -->
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="https" />
</intent>
<!-- If your app makes calls -->
<intent>
<action android:name="android.intent.action.DIAL" />
<data android:scheme="tel" />
</intent>
<!-- If your sends SMS messages -->
<intent>z
<action android:name="android.intent.action.SENDTO" />
<data android:scheme="smsto" />
</intent>
<!-- If your app sends emails -->
<intent>
<action android:name="android.intent.action.SEND" />
<data android:mimeType="*/*" />
</intent>
</queries>
and added this:
<key>LSApplicationQueriesSchemes</key>
<array>
<string>https</string>
<string>http</string>
</array>
in info.plist
and here is my code example:
onTap: () {
launch('mailto:[email protected]?subject=This is Subject Title&body=This is Body of Email');
}
but when I run my project I got the error :
* What went wrong:
A problem occurred configuring project ':url_launcher_android'.
> Could not resolve all artifacts for configuration ':url_launcher_android:classpath'.
> Could not find builder-3.4.2.jar (com.android.tools.build:builder:3.4.2).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/3.4.2/builder-3.4.2.jar
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 3s
Exception: Gradle task assembleDebug failed with exit code 1
can anyone help me please how can I solve it?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|