Fresh install flutter in ubuntu 18.04 wont run my first app - android

I tried to create my first app using flutter create newapp
but it wont run i always get an error
* What went wrong:
A problem occurred evaluating project ':app'.
> com/google/common/util/concurrent/SettableFuture
* 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 1s
Exception: Gradle task assembleDebug failed with exit code 1

I just wipe all the cache in .gradle/cache and it works

Related

what to do for this.............every time i run my android project i got this

Launching lib\main.dart on sdk gphone x86 in debug mode...
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'android'.
Failed to create Jar file C:\Users\Wrnglr.gradle\caches\jars-8\f1dd8e6ec0db9b111f425c513285a977\auto-value-annotations-1.6.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 2s
Exception: Gradle task assembleDebug failed with exit code 1
try the following :
1- remove .gradle file
2- stop firewall
3- run vpn like proton
4- run again

react-native-file-access:compileDebugKotlin FAILED

I get this error. when trying to run react-native run-android and the same with yarn android
What went wrong:
Execution failed for task ':react-native-file-access:compileDebugKotlin'.
Compilation error. See log for more details
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 1m 21s
Tried googling the error and tried the solutions and it seems to be related to the react native module

why does my flutter app not work after repeated reinstallations of java and gradle?

I have a problem with my Flutter app.
When I tried to start my app via an emulator, I got the following error message:
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:compileDebugKotlin'.
Kotlin could not find the required JDK tools in the Java installation 'C:\Program Files\AdoptOpenJDK\jre-11.0.11.9-hotspot' used by Gradle. Make sure Gradle is running on a JDK, not JRE.
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 1s
Exception: Gradle task assembleDebug failed with exit code 1
.
this is the standrad app which is created by flutter when creating a project and I have not changed it. When I received the message for the first time, I reinstalled gradle and java. but it didn't work. Can you help me?

FAILURE: Build failed with an exception running on emulator nexus5 api27

Launching lib\main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Could not create service of type DefaultUserHomeScopedCompileCaches using UserHomeScopeServices.createCompileCaches().
* 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 14s
Exception: Gradle task assembleDebug failed with exit code 1
Please tell me a solution to overcome this problem.
Run flutter clean in terminal or from android studio and try running the app again.

After ejecting the react-native app to android when i run 'npm run android' it gives error saying tools.jar is missing?

When i try to run npm run android command it gives following error. It said to check jdk in jre folder?
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':react-native-gesture-handler:compileDebugJavaWithJavac'.
Could not find tools.jar. Please check that C:\Program Files\Java\jre1.8.0_201 contains a valid JDK installation.
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.

Categories

Resources