Build failed: directory does not exist - android

Had a working project on a PC.
After transfering project on other PC (with installing Studio from scratch), unable to build the project now. Getting:
Error:FAILURE: Build failed with an exception.
What went wrong: A problem was found with the configuration of task ':app:dataBindingExportBuildInfoDebug'.
Directory 'Z:\path_to_proj\app\build\intermediates\data-binding-info\debug'
specified for property 'xmlOutFolder' does not exist.
Try: Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.
BUILD FAILED in 1s
Any clues where to dig?

Related

how to run with --stacktrace flutter

I'm trying to run my application -that is working fine with my team members-
but i keep getting this error
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring project ':package_info_plus'.
Could not load compiled classes for build file 'C:\src\flutter\flutter.pub-cache\hosted\pub.dartlang.org\package_info_plus-1.4.3+1\android\build.gradle' from cache.
Failed to notify project evaluation listener.
Could not get unknown property 'android' for project ':package_info_plus' of type org.gradle.api.Project.
Could not get unknown property 'android' for project ':package_info_plus' of type org.gradle.api.Project.
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 16s
Does anyone know the solution or can tell me how to view the stacktrace, I tried going to android studio-> settings-> compiler-> command
and i added --stacktrace but there is no changes in the run
try flutter run -d deviceid -v , will give you an insight as to whats happening
You can also cd into the android folder and run ./gradlew build

Getting buid error in node.js for Android

i am getting build error after i add android:requestLegacyExternalStorage="true" in Androidmanifest.xml file, without android:requestLegacyExternalStorage="true" can build . In android ver 10 devices cant create directory so i added android:requestLegacyExternalStorage="true".
I am build with node.js cmd prompt. Error as follow
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processDebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 4.908 secs
cmd: Command failed with exit code 1 Error output:
F:\Mobile Projects\1652019\FingerTips\OAMobile\platforms\android\build\intermediates\manifests\full\debug\AndroidManifest.xml:39: AAPT: No resource identifier found for attribute 'requestLegacyExternalStorage' in package 'android'
F:\Mobile Projects\1652019\FingerTips\OAMobile\platforms\android\build\intermediates\manifests\full\debug\AndroidManifest.xml:39: error: No resource identifier found for attribute 'requestLegacyExternalStorage' in package 'android'
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processDebugResources'.
What i tried, i remove android platform and add again, still getting error, i install this plugin also cordova plugin add cordova-android-support-gradle-release --variable ANDROID_SUPPORT_VERSION=27.+
when i trace with this command gradle compileDebug --scan , i get below 2 error
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
Where:
Script 'F:\Mobile Projects\1652019\FingerTips\OAMobile\platforms\android\CordovaLib\cordova.gradle' line: 64
What went wrong:
A problem occurred evaluating root project 'android'.
No installed build tools found. Install the Android build tools version 19.1.0 or higher.
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.
2: Task failed with an exception.
What went wrong:
A problem occurred configuring root project 'android'.
buildToolsVersion is not 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.
Regards and Thanks
Aravind
AAPT: No resource identifier found for attribute 'requestLegacyExternalStorage' in package 'android'
This is generally caused by using an incompatible build tools version. For requestLegacyExternalStorage, you need version 29.x build tools.
Open up Android Studio's SDK Manager and install the latest version of build tools available. Then make sure the build tools directory is in your PATH environment variable. Don't forget to restart your terminal session after changing your environment variables.

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: Always build with gradlew compileDebug

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.

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