Android Studio: Always build with gradlew compileDebug - android

Is there a way to customize Android Studio so that Gradle always runs with the compileDebug flag?
Anyone running the new Android Studio has likely seen the following error. The only solution I've found is to run gradlew compileDebug from the command line. Keeping a console window open all the time is a very poor workflow. Is there no way to display build errors within the IDE?
Gradle:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':TestProj:compileDebug'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

Related

Flutter Error. Execution failed for task ':app:processDebugMainManifest'

Hey I want to start learning flutter and I bought a course but when I try to run the auto-generated app I get the following error:
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> com.android.manifmerger.ManifestMerger2$MergeFailureException: java.io.FileNotFoundException: E:\Flutter\untitled\build\app\intermediates\navigation_json\debug\navigation.json (The system cannot find the file specified)
* 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 31s
Running Gradle task 'assembleDebug'...
[!] Gradle threw an error while downloading artifacts from the network. Retrying to download...
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> com.android.manifmerger.ManifestMerger2$MergeFailureException: java.io.FileNotFoundException: E:\Flutter\untitled\build\app\intermediates\navigation_json\debug\navigation.json (The system cannot find the file specified)
* 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
[!] Gradle threw an error while downloading artifacts from the network. Retrying to download...
Exception: Gradle task assembleDebug failed with exit code 1
I saw other people talk about this here but the solution that worked for them didn't work for me.
Here are the things I've tried:
./gralew clean or./gradlew build
/flutter clean
reinstalling flutter and android studio from scratch.
deleting the gradle files and the build files.
switching to another laptop.
I will be very grateful if you guys can help me.
Best Regards,
-Roee Hovav.
Peace!
Open Android Studio make sure you have the latest version installed, and everything is updated then go ahead and open the Flutter project and trying building it from Android Studio
I found the similar error but for me is missing of androidmanifest.xml and I have fixed it
For me I have deleted the android folder and run command "flutter create ."
then I got another of errors about "SdkMinVersion" and "Flutter multidex handling is disabled." and fixed it step by step
Anyway I have found this solution after I have fixed and hope it will help you
--> changing gradle version as the link below
https://github.com/tekartik/sqflite/issues/380

How to resolve Gradle task assembleDebug failed with exit code 1 in my first flutter app?

I recently come from java and try to make my first app in flutter in android studio in windows 10.
I tried first sample code in my real android device and got this error.
I cant find proper after struggling 5 hours
In console get this error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:stripDebugDebugSymbols'.
> NDK at C:\Users\10\AppData\Local\Android\sdk\ndk-bundle did not have a source.properties file
* 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
Looks like you are missing NDK installation. Please confirm if highlighted item is installed

How to Run with --stacktrace option to get the stack trace

I keep getting this error and i don't seem to find any help online. I am new to flutter and android studio. any help is well appreciated
FAILURE: Build failed with an exception.
Where:
Build file 'C:\Android\Android Studios\cravings\android\app\build.gradle' line: 26
What went wrong:
A problem occurred evaluating project ':app'.
Could not open dsl remapped class cache for eq9b73nqpstq0kplnrtticwqc (C:\Users\October Price.gradle\caches\5.6.2\scripts-remapped\flutter_f2f86ofj12jp9hosmvp06kahh\eq9b73nqpstq0kplnrtticwqc\dsl9d9bdfa13168004751655a79e56a065e).
Unexpected lock protocol found in lock file. Expected 3, found 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 1s
Finished with error: Gradle task assembleDebug failed with exit code
You can try running the assembleDebug Gradle task manually.
cd android
./gradlew assembleDebug --stacktrace
But there could be something wrong with your configuration.
Run flutter doctor -v and see if everything is setup correctly.
Otherwise you can try deleting the Gradle cache folder which seem to bet at C:\Users\October Price.gradle\caches.
You can set your android compiler to always run with --stacktrace modifier.
Head to Settings > Build, Execution, Deployment > Compiler
Add --debug or --info or --stacktrace (Or combination of them) to the Command line options
In your case clearing C:\Users\October Price\.gradle\caches folder and re-syncing the project might help.
You can also use --verbose to get the full flutter stack trace. so for example:
flutter build apk --debug --verbose
You can use gradlew command to run from command line. to get more details of gradlew you can type gradlew --help. For further information regarding How to run from Command line follow this link.

Cordova build command fails from command Prompt. Task 'cdvBuildDebug' not found in root project 'android'

I am trying to build and generate APK using command prompt. When I used command "cordova build android" for building the project, I am stuck at following issue:
ANDROID_HOME=C:\Phonegap\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_151
Starting a new Gradle Daemon for this build (subsequent builds will be faster).
Incremental java compilation is an incubating feature.
FAILURE: Build failed with an exception.
What went wrong:
Task 'cdvBuildDebug' not found in root project 'android'.
BUILD FAILED
Total time: 36.254 secs
Try:
Run gradlew tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
What went wrong:
Task 'cdvBuildDebug' not found in root project 'android'.
Try:
Run gradlew tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Can anyone tell me where is this property "cdvBuildDebug" resides and how can i fix this issue?
Try to make build using the phonegap build website .
https://build.phonegap.com/people/sign_in

android studio run programs

I try an android studio. It is ok at the beginning. When I do a activity with many java content, it cannot run the program. It has the below error:
Gradle:
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':ImageCropper:compileDebug'.
Compilation failed; see the compiler error output for details.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Could not execute build using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.6-bin.zip'.
After I comment the code it is ok. There is no problem with code. How to deal with this?

Categories

Resources