cordova phonegap error 1 while build apk - node.js

FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':processDebugResources'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\adt-bundle-windows-x86_64-20140702\adt-bundle-windows-x86_64-20140702\sdk\build-tools\22.0.1\aapt.exe'' finished with non-zero exit value 1
Try:
BUILD FAILED
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Total time: 7.291 secs
ERROR building one of the platforms: Error code 1 for command: cmd with args: /s,/c,"E:\nissagaza\platforms\android\gradlew cdvBuildDebug
-b E:\nissagaza\platforms\android\build.gradle -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true"
You may not have the required environment or OS to build this project
Error: Error code 1 for command: cmd with args: /s,/c,"E:\nissagaza\platforms\android\gradlew cdvBuildDebug -b
E:\nissagaza\platforms\android\build.gradle -Dorg.gradle.daemon=true
-Pandroid.useDeprecatedNdk=true"

Related

assert pluginDirectory.exists()

FAILURE: Build failed with an exception.
* Where:
Script '/Users/elamraoui/flutter/packages/flutter_tools/gradle/app_plugin_loader.gradle' line: 33
* What went wrong:
A problem occurred evaluating script.
> assert pluginDirectory.exists()
| |
| false
C:\\src\\flutter_windows_3.3.5-stable\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\firebase_core-1.24.0\\/android
* 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 transfer my app from windows to Mac and I can't run my app in android studio now.
Someone can help me to understand what I'm supposed to do ?
flutter pub get didn't help.

Try adding the name of the type of the variable or the keyword var addPostFrameCallback

/C:/development/flutter/packages/flutter/lib/src/widgets/binding.dart:271:3: Error: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
Try adding the name of the type of the variable or the keyword 'var'.
addPostFrameCallback
^^^^^^^^^^^^^^^^^^^^
/C:/development/flutter/packages/flutter/lib/src/widgets/binding.dart:271:3: Error: Expected ';' after this.
addPostFrameCallback
^^^^^^^^^^^^^^^^^^^^
FAILURE: Build failed with an exception.
Where:
Script 'C:\development\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1102
What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
Process 'command 'C:\development\flutter\bin\flutter.bat'' finished with non-zero exit value 1
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 18s
Exception: Gradle task assembleDebug failed with exit code 1

I'm trying to run a flutter app but this happens when running gradle task 'assemblyDebug'. How can I get past this

FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'android'.
Could not resolve all artifacts for configuration ':classpath'.
Could not download kotlin-compiler-embeddable.jar (org.jetbrains.kotlin:kotlin-compiler-embeddable:1.3.50)
> Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.3.50/kotlin-compiler-embeddable-1.3.50.jar'.
> Connection reset
Could not download fastutil.jar (it.unimi.dsi:fastutil:7.2.0)
> Could not get resource 'https://jcenter.bintray.com/it/unimi/dsi/fastutil/7.2.0/fastutil-7.2.0.jar'.
> Connection reset
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 22m 42s
Exception: Gradle task assembleDebug failed with exit code 1

On run app in android studio first stuck at Running Gradle task 'assembleDebug'... and after some time gives an exception

Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:desugarDebugFileDependencies'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not download armeabi_v7a_debug.jar (io.flutter:armeabi_v7a_debug:1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408)
> Could not get resource 'http://download.flutter.io/io/flutter/armeabi_v7a_debug/1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408/armeabi_v7a_debug-1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.jar'.
> Read timed 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 3m 30s
Finished with error: Gradle task assembleDebug failed with exit code 1

React Native app can't be started after upgrading to nodejs 12.13 from 10.13

My React Native used to run fine with 0.61.2 with Nodej 10.13. There is an error after upgrading to nodejs 12.13.0 when react-native run-android. Here is the error:
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 1461 file(s) to forward-jetify. Using 4 workers...
info Starting JS server...
info Installing the app...
FAILURE: Build failed with an exception.
* Where:
Script 'C:\D\code\js\emps_fe6\node_modules\#react-native-community\cli-platform-android\native_modules.gradle' line: 182
* What went wrong:
A problem occurred evaluating script.
> Text must not be null or empty
* 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
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.
* Where:
Script 'C:\D\code\js\emps_fe6\node_modules\#react-native-community\cli-platform-android\native_modules.gradle' line: 182
* What went wrong:
A problem occurred evaluating script.
> Text must not be null or empty
* 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
at checkExecSyncError (child_process.js:621:11)
at execFileSync (child_process.js:639:15)
at runOnAllDevices (C:\d\code\js\emps_fe6\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:39)
at buildAndRun (C:\d\code\js\emps_fe6\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\index.js:158:41)
at C:\d\code\js\emps_fe6\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\index.js:125:12
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Command.handleAction (C:\d\code\js\emps_fe6\node_modules\#react-native-community\cli\build\index.js:164:9)
./gradlew clean failed as well. What is wrong with the upgrade? Shall I roll back to nodejs 10.13?

Resources