```> Task :app:mergeDebugNativeLibs FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:mergeDebugNativeLibs'.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
More than one file was found with OS independent path 'lib/x86/libnode.so'. If you are using jniLibs and CMake IMPORTED targets, see https://developer.android.com/studio/preview/features#automatic_packaging_of_prebuilt_dependencies_used_by_cmake
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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings
BU?LD FAILED in 20s
41 actionable tasks: 3 executed, 38 up-to-date
Command failed with exit code 1: C:\Users\Privat\Desktop\FamilienPunkte\fp\platforms\android\gradlew cdvBuildDebug -b C:\Users\Privat\Desktop\FamilienPunkte\fp\platforms\android\build.gradle```
Im using nodejs-mobile-cordova and cordova-plugin-console plugins.
Ty for helping!
Related
The project is made with ionic 3, when I try to generate the apk I get this error, I don't know what approach to use to deal with this problem please I need your help. Here is the error I get, I tried several alternatives but no success, the version of graddle is there 7.1
> Task :app:checkReleaseAarMetadata FAILED
> Task :app:bundleReleaseResources FAILED
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:checkReleaseAarMetadata'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
> The minCompileSdk (33) specified in a
dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
is greater than this module's compileSdkVersion (android-28).
Dependency: androidx.appcompat:appcompat-resources:1.6.0-rc01.
AAR metadata file: /home/roosvelt/.gradle/caches/transforms-3/2166b563575881abf26d682bf5e7b40b/transformed/jetified-appcompat-resources-1.6.0-rc01/META-INF/com/android/build/gradle/aar-metadata.properties.
* 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:
Execution failed for task ':app:bundleReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.Aapt2ProcessResourcesRunnable
> Android resource linking failed
ERROR:/home/roosvelt/.gradle/caches/transforms-3/8e2876a9a5ebb578738285d001baa267/transformed/core-1.9.0/res/values/values.xml:104:5-113:25: AAPT: error: resource android:attr/lStar not found.
* 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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.1.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 41s
25 actionable tasks: 25 executed
Command failed with exit code 1: /home/roosvelt/Documents/Dev/Perso/freevigile-master/platforms/android/gradlew :app:bundleRelease -b /home/roosvelt/Documents/Dev/Perso/freevigile-master/platforms/android/build.gradle
Error: Command failed with exit code 1: /home/roosvelt/Documents/Dev/Perso/freevigile-master/platforms/android/gradlew :app:bundleRelease -b /home/roosvelt/Documents/Dev/Perso/freevigile-master/platforms/android/build.gradle
at makeError (/home/roosvelt/Documents/Dev/Perso/freevigile-master/node_modules/cordova-android/node_modules/execa/lib/error.js:60:11)
at handlePromise (/home/roosvelt/Documents/Dev/Perso/freevigile-master/node_modules/cordova-android/node_modules/execa/index.js:118:26)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async ProjectBuilder.build (/home/roosvelt/Documents/Dev/Perso/freevigile-master/node_modules/cordova-android/lib/builders/ProjectBuilder.js:316:20)
[ERROR] An error occurred while running subprocess cordova.
cordova build android --release --verbose exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
ionic:utils-process onBeforeExit handler: 'process.exit' received +0ms
ionic:utils-process onBeforeExit handler: running 2 functions +0ms
ionic:utils-process processExit: exiting (exit code: 1) +268ms
Hello, I use Ionic for my app. I can serve it but cant built. Here this problem:
Please, help me if you can
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileReleaseJavaWithJavac'.
> 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. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.1.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 30s
47 actionable tasks: 8 executed, 39 up-to-date
Command failed with exit code 1: C:\Users\Darkhan\Downloads\GrandTovarPlus\pvl\platforms\android\gradlew :app:bundleRelease -b C:\Users\Darkhan\Downloads\GrandTovarPlus\pvl\platforms\android\build.gradle
[ERROR] An error occurred while running subprocess cordova.
cordova.cmd build android --release exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':rn-indy-sdk:androidJavadoc'.
> Javadoc generation failed. Generated Javadoc options file (useful for troubleshooting): '/Users/.../MyProject/node_modules/rn-indy-sdk/android/build/tmp/androidJavadoc/javadoc.options'
* 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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.7/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 3m 58s
2306 actionable tasks: 2107 executed, 199 up-to-date
error Failed to build the app.
Error: Command failed: ./gradlew build -x lint
at makeError (/Users/.../MyProject/node_modules/execa/index.js:174:9)
at Function.module.exports.sync (/Users/.../MyProject/node_modules/execa/index.js:338:15)
at buildApk (/Users/.../MyProject/node_modules/#react-native-community/cli-platform-android/build/commands/runAndroid/index.js:181:22)
at runOnSpecificDevice (/Users/.../MyProject/node_modules/#react-native-community/cli-platform-android/build/commands/runAndroid/index.js:162:7)
at buildAndRun (/Users/.../MyProject/node_modules/#react-native-community/cli-platform-android/build/commands/runAndroid/index.js:147:12)
at /Users/.../MyProject/ItdotMobile/node_modules/#react-native-community/cli-platform-android/build/commands/runAndroid/index.js:132:12
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async Command.handleAction (/Users/.../MyProject/node_modules/#react-native-community/cli/build/index.js:186:9)
info Run CLI with --verbose flag for more details.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
When I run yarn run android on a terminal, the build is failed for task ...androidJavadoc.
rn-indy-sdk is a library that I use in my project, so it seems that rn-indy-sdk library cannot be built because of something related to Javadoc.
Where should I start to look at for solving this problem? Thanks.
I also ran into this problem while using a different react native library. The solution is to open the build.gradle file located at node_modules/rn-indy-sdk/android/build.gradle and add this code:
tasks.withType(Javadoc) {
failOnError false
options.addStringOption('Xdoclint:none', '-quiet')
options.addStringOption('encoding', 'UTF-8')
options.addStringOption('charSet', 'UTF-8')
}
I started to work on a react native project. But I have a problem now. I built a simple project and execute react-native run-android. But error occurred.
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 954 file(s) to forward-jetify. Using 6 workers...
info Starting JS server...
info Installing the app...
> Task :app:createDebugCompatibleScreenManifests FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.5/userguide/command_line_interface.html#sec:command_line_warnings
40 actionable tasks: 12 executed, 28 up-to-date
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:createDebugCompatibleScreenManifests'.
> Failed to create directory 'E:\web_project\fcManager\app\svn_prj\02_source\fcmanager\android\app\build\intermediates\compatible_screen_manifest\debug\createDebugCompatibleScreenManifests\out'
* 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 7s
error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run
CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:createDebugCompatibleScreenManifests'.
> Failed to create directory 'E:\web_project\fcManager\app\svn_prj\02_source\fcmanager\android\app\build\intermediates\compatible_screen_manifest\debug\createDebugCompatibleScreenManifests\out'
* 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
And then I cleared the cache by yarn start --reset-cache, and execute again react-native run-android. Error again. But the latter errors are different from the former errors.
What could be a problem?
Wow. I solve the problem.
>cd android
android>./gradlew clean
And then apk is successfully installed on the emulator.
I am getting below error, When I try to clean my Android NDK project
12:41:28: Executing task 'clean'...
Executing tasks: [clean]
Task :app:externalNativeBuildCleanDebug FAILED
Clean NextGenJNIWrapperExample armeabi-v7a
ninja: error: loading 'build.ninja': The system cannot find the file specified.
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:externalNativeBuildCleanDebug'.
Build command failed.
Error while executing process D:\Android\Sdk\cmake\3.6.4111459\bin\cmake.exe with arguments {--build D:\ssl\NGC\NextGenConsole\app.externalNativeBuild\cmake\debug\armeabi-v7a --target clean}
ninja: error: loading 'build.ninja': 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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.10.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 0s
1 actionable task: 1 executed
12:41:29: Task execution finished 'clean'.
I had same issue and i fixed it
externalNativeBuild {
cmake {
path "src/main/cpp/CMakeLists.txt"
version "3.10.2" // just add current installed version of CMake
}
}