Getting more information about Gradle build error - android

I am working on a hybrid mobile app that uses Ionic Framework 5.x and while it builds with no issues, when I run the command ionic capacitor update and try to run the app using Android Studio 4.1.1 and Gradle 3.6.1 (android/capacitor/build.gradle), the app does not get installed in the Android emulator (I am testing on Android 7), due to the following error:
Gradle build failed with 1 error(s) in 1 s 532 ms
Is there a way I can find out what the error is?
Thanks

You can check Logcat or Event Log

Try to build manually:
cd ./android/capacitor
./gradlew :assembleDebug

Related

Error Running Gradle build - ionic cap run

I have a problem several days ago, I work in ubuntu and I would appreciate it very much if you help me :( I have a personal project that is finished and I want to get the apk, when I create the apk with ionic cap build I don't get any error, just a warn of Plugins are missing dependencies which I don't think is a problem, worse when I run ionic cap run and select the device either external or emulator I get Running Gradle build - failed! and at the end An error occurred while running thread capacitor. ionic cap build warning ionic cap run ERROR Also when I create the apk android studio opens automatically and I get this message: Error: Android Studio
WARNING
ERROR BUILD
Error Android Studio
I already tried deleting the node_modules folder, installing android studio, node, java,
gradle although I don't know if it installed correctly, etc.
1st image: You're missing the es6-promise-plugin. you need to install it
2nd and 3rd image: you are using an old version of gradle, which it is making it incompatible with what the compiler uses (8+). You need to install new version of gradle.

Flutter error "Finished with error: Gradle task assembleDebug failed with exit code -1"

I'm using windows 10 64-bit system
I'm running default flutter project code on my real device ( Samsung A30)
and I also enabled USB debugging on my phone.
All android versions are installed in my Android Studio. I also updated Flutter SDK and my Gradle is also updated.
I also gave path of flutter sdk in my environment variables.
Still, I'm facing error while running flutter project like
"Finished with error:gradle task assembledebug failed with exit code
-1".
I even uninstalled Android Studio, Dart and removed Flutter and again installed everything, but still getting the same error. VS Code is also giving same error.
What can I do to fix this error?
You are not enable in your developer options install via USB.

Ionic - Error: Failed to fetch plugin cordova-plugin-statusbar#https://github.com/apache/cordova-plugin-statusbar.git via registry

I just created a new app with the next command:
ionic start myapp
Everything works fine but when I try to deploy to Android (My Android studio environment is properly installed and configured), I get the next error:
Error: Failed to fetch plugin cordova-plugin-statusbar#https://github.com/apache/cordova-plugin-statusbar.git
via registry.
I try to deploy with:
ionic cordova run android
Thanks in advance.
This work for me, If the other solutions did,t work
cordova plugin add https://github.com/apache/cordova-plugin-statusbar.git
I found the solution. Just run this command:
cordova plugin add cordova-plugin-statusbar
Now I can deploy my app but I don't know why that plugin is not installed automatically.

Phonegap/Cordova building APK exit code 1?

Ive finnished a final year project using phonegap on OSX and i want to make a APK for user testing.
When i've been testing the app on my android tablet i use
phonegap run android // or // cordova run android
it builds and goes onto my android device fine, works properly and all the plugins work fine, however i want to be able to make its own .APK file so friends can test it and give me feedback.
I was told to use
phonegap build android --release
When i use this command it will fall over with an exit code 1 saying i may not have the required platform or OS to build this project, despite when running the previous command it says build fine.
Error code in CLI
BUILD FAILED
Total time: 4.202 secs
/Users/robertlemm/Development/phonegap_dev/Little_Scavngers/platforms/android/cordova/node_modules/q/q.js:126
throw e;
^
Error code 1 for command: /Users/robertlemm/Development/phonegap_dev/Little_Scavngers/platforms/android/gradlew with args: cdvBuildRelease,-b,/Users/robertlemm/Development/phonegap_dev/Little_Scavngers/platforms/android/build.gradle,-Dorg.gradle.daemon=true
ERROR building one of the platforms: Error: /Users/robertlemm/Development/phonegap_dev/Little_Scavngers/platforms/android/cordova/build: Command failed with exit code 1
You may not have the required environment or OS to build this project
Error: /Users/robertlemm/Development/phonegap_dev/Little_Scavngers/platforms/android/cordova/build: Command failed with exit code 1
I've ensured android tools & platform tools are up in my $PATH, checked SDK manager to ensure ive got version 14 to latest installed, checked the Platforms.JSON file to ensure the versions are set to the minimum, the config.xml
says <preference name="android-minSdkVersion" value="16" />
Honestly not sure how to do it
Have you tried removing and adding again the android platform?
I remember having this issue several times and fixing it by just doing that.

Error building cordova app Visual Studio 2015

I'm using Visual Studio 2015. I'm trying to build an apk from my cordova app for testing on my phone. But when I'm trying to build app, I obtain 2 error : Command failed with exit code 1.
You can find log file here :http://pastebin.ca/3379979
What should I do?
Thanks.

Categories

Resources