Can't run Flutter app error "FAILURE: Build failed with an exception." - android-studio

This app is from Github
"https://github.com/wiltonribeiro/grocery_shop_flutter"
I was wondering if someone else is able to run it because i get some execution errors and I cant fix them.
I would appreciate it if someone can fix the issue
Cheers!
Edit: I appreciate your responses
the error looks like this:
"
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:processDebugResources'.
Android resource linking failed
Output: O:\grocery_shop_flutterbait\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:86: error: resource android:attr/fontVariationSettings not found.
O:\grocery_shop_flutterbait\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:87: error: resource android:attr/ttcIndex not found.
error: failed linking references.
Command: C:\Users\arsla.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\6eab767dc8c1fd40d868c7361b7d30e9\aapt2-3.2.1-4818971-windows\aapt2.exe link -I
C:\Users\arsla\AppData\Local\Android\sdk\platforms\android-27\android.jar
--manifest
O:\grocery_shop_flutterbait\build\app\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml
-o
O:\grocery_shop_flutterbait\build\app\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_
-R
#O:\grocery_shop_flutterbait\build\app\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt
--auto-add-overlay
--java
O:\grocery_shop_flutterbait\build\app\generated\not_namespaced_r_class_sources\debug\processDebugResources\r
--custom-package
com.example.groceryshopflutter
-0
apk
--output-text-symbols
O:\grocery_shop_flutterbait\build\app\intermediates\symbols\debug\R.txt
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
Output: C:\Users\arsla.gradle\caches\transforms-1\files-1.1\core-1.1.0.aar\18619ad8df18189ffa8d36e63947ac33\res\values\values.xml:174:5-210:25: AAPT: error: resource android:attr/fontVariationSettings not found.
C:\Users\arsla.gradle\caches\transforms-1\files-1.1\core-1.1.0.aar\18619ad8df18189ffa8d36e63947ac33\res\values\values.xml:174:5-210:25: AAPT: error: resource android:attr/ttcIndex not found.
error: failed linking references.
Command: C:\Users\arsla.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\6eab767dc8c1fd40d868c7361b7d30e9\aapt2-3.2.1-4818971-windows\aapt2.exe link -I
C:\Users\arsla\AppData\Local\Android\sdk\platforms\android-27\android.jar
--manifest
O:\grocery_shop_flutterbait\build\app\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml
-o
O:\grocery_shop_flutterbait\build\app\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_
-R
#O:\grocery_shop_flutterbait\build\app\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt
--auto-add-overlay
--java
O:\grocery_shop_flutterbait\build\app\generated\not_namespaced_r_class_sources\debug\processDebugResources\r
--custom-package
com.example.groceryshopflutter
-0
apk
--output-text-symbols
O:\grocery_shop_flutterbait\build\app\intermediates\symbols\debug\R.txt
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
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 19s
Exception: Gradle task assembleDebug failed with exit code 1
""

I tried to compile it to android and i could fix this error by changing compileSdkVersion to 28
However the solution is applicable if you follow the instruction on https://github.com/wiltonribeiro/grocery_shop_flutter

Yes, it works perfectly fine in the latest version.product picture (only for ios phone running).
No need to worry>>> Only on terminal, It still tells an error message "Your Flutter application is created using an older version of the Android
embedding. It's being deprecated in favor of Android embedding v2. Follow the
steps at
https://flutter.dev/go/android-project-migration"
The output looks like this!!!

Related

Gradle: Could not resolve me.champeau.gradle:gradle-javadoc-hotfix-plugin:0.1

I'm trying to upgrade Gradle version from 4.10.3 to 6.8 for project https://archive.apache.org/dist/groovy/2.5.8/sources/apache-groovy-src-2.5.8.zip
and for that I modified build.gradle this way https://gist.github.com/iva-nova-e-katerina/c2fe31c429d19ecf2e08e53f638de451 , but I have the following error building this project:
└─$ ./gradlew -PskipIndy clean distBin 1 ⨯
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'groovy'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not resolve me.champeau.gradle:gradle-javadoc-hotfix-plugin:0.1.
Required by:
project :
> Could not resolve me.champeau.gradle:gradle-javadoc-hotfix-plugin:0.1.
> Could not get resource 'https://dl.bintray.com/melix/gradle-javadoc-hotfix-plugin/me/champeau/gradle/gradle-javadoc-hotfix-plugin/0.1/gradle-javadoc-hotfix-plugin-0.1.pom'.
> Could not GET 'https://dl.bintray.com/melix/gradle-javadoc-hotfix-plugin/me/champeau/gradle/gradle-javadoc-hotfix-plugin/0.1/gradle-javadoc-hotfix-plugin-0.1.pom'. Received status code 403 from server: Forbidden
* 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
Could you tell me how to fix that?
This plugin found in the repository
maven `{ url "https://repo.spring.io/plugins-release" }
look here https://gitee.com/mirrors/spring-social/blob/master/build.gradle`

I'm trying to run a flutter app but this happens when running gradle task 'assemblyDebug'. How can I get past this

FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'android'.
Could not resolve all artifacts for configuration ':classpath'.
Could not download kotlin-compiler-embeddable.jar (org.jetbrains.kotlin:kotlin-compiler-embeddable:1.3.50)
> Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.3.50/kotlin-compiler-embeddable-1.3.50.jar'.
> Connection reset
Could not download fastutil.jar (it.unimi.dsi:fastutil:7.2.0)
> Could not get resource 'https://jcenter.bintray.com/it/unimi/dsi/fastutil/7.2.0/fastutil-7.2.0.jar'.
> Connection reset
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 22m 42s
Exception: Gradle task assembleDebug failed with exit code 1

Error when passing an app to my Huawei - Android-studio - Flutter

hello I’m trying to pass by my first made an application(flutter) to my phone(Huawei) but gives me a strange error someone has already gone through the same, can anyone help me? Thank you very much!
ERROR:
Launching lib/main.dart on ALE L21 in debug mode...
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugGoogleServices'.
> File google-services.json is missing. The Google Services Plugin cannot function without it.
Searched Location:
/Users/indumonta/AndroidStudioProjects/smarthouse/android/app/src/nullnull/google-services.json
/Users/indumonta/AndroidStudioProjects/smarthouse/android/app/src/debug/google-services.json
/Users/indumonta/AndroidStudioProjects/smarthouse/android/app/src/nullnullDebug/google-services.json
/Users/indumonta/AndroidStudioProjects/smarthouse/android/app/src/nullnull/debug/google-services.json
/Users/indumonta/AndroidStudioProjects/smarthouse/android/app/src/debug/nullnull/google-services.json
/Users/indumonta/AndroidStudioProjects/smarthouse/android/app/google-services.json
* 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 9s
Exception: Gradle task assembleDebug failed with exit code 1

Why does AS wants compile project after flutter update

FAILURE: Build failed with an exception.
Just updated flutter to 1.5.4-hotfix.2
and now my project doesnt compile but my co-worker had no problems with same version
CONSOLE OUTPUT
Launching lib\main.dart on SM G955F in debug mode...
Initializing gradle...
Resolving dependencies...
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
Output: D:\Desktop\asdPrj\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.
D:\Desktop\asdPrj\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found.
D:\Desktop\asdPrj\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:906: error: resource android:attr/fontVariationSettings not found.
D:\Desktop\asdPrj\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:906: error: resource android:attr/ttcIndex not found.
error: failed linking references.
Command: C:\Users\Janer\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\78f68b33382372bc3dc84b96fd530582\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\
C:\Users\Janer\AppData\Local\Android\sdk\platforms\android-27\android.jar\
--manifest\
D:\Desktop\asdPrj\build\app\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\
-o\
D:\Desktop\asdPrj\build\app\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
-R\
#D:\Desktop\asdPrj\build\app\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
--auto-add-overlay\
--java\
D:\Desktop\asdPrj\build\app\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
--custom-package\
ga.aninet\
-0\
apk\
--output-text-symbols\
D:\Desktop\asdPrj\build\app\intermediates\symbols\debug\R.txt\
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
Output: C:\Users\Janer\.gradle\caches\transforms-1\files-1.1\appcompat-1.0.0.aar\9a8530dc700588f390ca440a65237576\res\values-v28\values-v28.xml:9:5-12:13: AAPT: error: resource android:attr/dialogCornerRadius not found.
D:\Desktop\asdPrj\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:11: AAPT: error: resource android:attr/dialogCornerRadius not found.
C:\Users\Janer\.gradle\caches\transforms-1\files-1.1\core-1.0.0.aar\becf871373d3300ffd53f5291be852df\res\values\values.xml:89:5-125:25: AAPT: error: resource android:attr/fontVariationSettings not found.
C:\Users\Janer\.gradle\caches\transforms-1\files-1.1\core-1.0.0.aar\becf871373d3300ffd53f5291be852df\res\values\values.xml:89:5-125:25: AAPT: error: resource android:attr/ttcIndex not found.
error: failed linking references.
Command: C:\Users\Janer\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\78f68b33382372bc3dc84b96fd530582\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\
C:\Users\Janer\AppData\Local\Android\sdk\platforms\android-27\android.jar\
--manifest\
D:\Desktop\asdPrj\build\app\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\
-o\
D:\Desktop\asdPrj\build\app\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
-R\
#D:\Desktop\asdPrj\build\app\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
--auto-add-overlay\
--java\
D:\Desktop\asdPrj\build\app\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
--custom-package\
ga.aninet\
-0\
apk\
--output-text-symbols\
D:\Desktop\asdPrj\build\app\intermediates\symbols\debug\R.txt\
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
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 gradle url
BUILD FAILED in 5s
Finished with error: Gradle task assembleDebug failed with exit code 1
The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app.
See [googleHref][2] for more information on the problem and how to fix it.
Execute the flutter clean command in your project, to erase everything in cache of previous compilations

Android Studio: Error after deleting file

I got this error:
Error:Execution failed for task ':app:generateDebugBuildConfig'. > java.io.IOException: Could not delete path 'C:\Users\Guest Account\Documents\COLLEGE\FYP\7. Iteration 4\fridge iteration 4\app\build\generated\source\buildConfig\debug\com'.
and saw 'could not delete path' so I decided to follow the path and delete the path. When I reran the app I got seven new errors:
Error:Execution failed for task ':app:processDebugResources'.
Failed to execute aapt
Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:failed linking file resources.
Error:attribute 'com.virtual.fridge:layout_behavior' not found.
Error:error: attribute 'com.virtual.fridge:layout_behavior' not found.
In my even log I have two new messages:
* daemon not running; starting now at tcp:5037
21:10 * daemon started successfully
I am going to presume this is down to deleting that file.. is there anything I can do? Really new to android studio so I appreciate any help. Please tell me what other information I shoudl provide
I cleaned the project and built it and it worked

Resources