Getting buid error in node.js for Android - 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.

Related

the probleem in flutter it is occcoureed when i try to make run

when io try to mak run on phone in flutter it always show me this
FAILURE: Build failed with an exception.
Where:
Build file 'C:\Users\3mrxc\OneDrive\��� ������\flutter_application_1\android\app\build.gradle' line: 23
What went wrong:
A problem occurred evaluating project ':app'.
Failed to apply plugin 'com.android.internal.application'.
Your project path contains non-ASCII characters. This will most likely cause the build to fail on Windows. Please move your project to a different directory. See http://b.android.com/95744 for details. This warning can be disabled by adding the line 'android.overridePathCheck=true' to gradle.properties file in the project directory.
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
Launching lib\main.dart on Android SDK built for x86 in debug mode...
lib\main.dart:1
BUILD FAILED in 1s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
if someone the solution I will be thankfull

Flutter Android resource linking failed and Failed to apply plugin [id 'kotlin-android']

Opened a project after 2 months, got null-safety error changed some plugins, and upgraded others, one thing led to another and now I am stuck at this error!
Tried Flutter clean and deleting the build and .gradle folder but nothing worked.
Launching lib\main.dart on RMX1801 in debug mode...
lib\main.dart:1
3
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource linking failed
C:\Users\Dell\.gradle\caches\transforms-2\files-2.1\b94a6b46912fba96397655c3d1ce5de0\play-services-ads-lite-19.6.0\AndroidManifest.xml:27:5-38:15: AAPT: error: unexpected element <queries> found in <manifest>.
* 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 8m 59s
The build failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetifier to solve the incompatibility.
Building plugin audioplayers...
Project evaluation failed including an error in afterEvaluate {}. Run with --stacktrace for details of the afterEvaluate {} error.
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\Dell\flutter\.pub-cache\hosted\pub.dartlang.org\audioplayers-0.18.2\android\build.gradle' line: 25
* What went wrong:
A problem occurred evaluating root project 'audioplayers'.
> Failed to apply plugin [id 'kotlin-android']
> The current Gradle version 4.10.2 is not compatible with the Kotlin Gradle plugin. Please use Gradle 5.3 or newer, or the previous version of the Kotlin plugin.
* 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 54s
2
Exception: The plugin audioplayers could not be built due to the issue above.
Exited (sigterm)
You're getting a AAPT: error: unexpected element <queries> found in <manifest>. it looks like you have to update your gradle version to one of the ones listed here
https://github.com/miguelpruivo/flutter_file_picker/wiki/Troubleshooting
3.3.3
3.4.3
3.5.4
3.6.4
4.0.1
it looks like you need to downgrade your gradle version since you're using 4.10.2

Getting error while trying to build with flutter_local_notification plugin in my flutter app

Launching lib\main.dart on sdk gphone x86 arm in debug mode...
lib\main.dart
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:processDebugResources'.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
Android resource linking failed
C:\Users\shibl\Desktop\project-3\myTodo\android\app\src\main\AndroidManifest.xml:44:13-51:23: AAPT: error: unexpected element found in .
C:\Users\shibl\Desktop\project-3\myTodo\android\app\src\main\AndroidManifest.xml:52:12-109: AAPT: error: unexpected element <receiver> found in <manifest><application><activity>.
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 15s
The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the incompatibility.
Building plugin flutter_local_notifications...
FAILURE: Build failed with an exception.
Where:
Build file 'C:\Flutter\flutter.pub-cache\hosted\pub.dartlang.org\flutter_local_notifications-3.0.1+2\android\build.gradle' line: 22
What went wrong:
A problem occurred evaluating root project 'flutter_local_notifications'.
Failed to apply plugin [id 'com.android.internal.version-check']
Minimum supported Gradle version is 5.6.4. Current version is 5.6.2. If using the gradle wrapper, try editing the distributionUrl in C:\Flutter\flutter.pub-cache\hosted\pub.dartlang.org\flutter_local_notifications-3.0.1+2\android\gradle\wrapper\gradle-wrapper.properties to gradle-5.6.4-all.zip
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: The plugin flutter_local_notifications could not be built due to the issue above.
Exited (sigterm)
I had this same error, and I resolved it by placing the receiver syntax inside the application tag in AndroidManifest.xml.

publishNonDefault is deprecated and has no effect anymore. All variants are now published

ANDROID_HOME=E:\Android\Sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_181
studio
Subproject Path: CordovaLib
Subproject Path: app
publishNonDefault is deprecated and has no effect anymore. All variants are now published.
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring project ':CordovaLib'.
No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Get more help at https://help.gradle.org
BUILD FAILED in 5s
cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring project ':CordovaLib'.
No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Get more help at https://help.gradle.org
BUILD FAILED in 5s
[ERROR] An error occurred while running subprocess cordova.
cordova build android exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.

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

Categories

Resources