Generation Apk Ionic - ionic-framework

I have an error when i want to create APK, please help me ?
Build at: 2021-03-26T18:46:10.897Z - Hash: 7c6bf6a761ede9369f11 - Time: 23007ms
cordova.cmd build android
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=C:\Users\jmunozo\AppData\Local\Android\Sdk (recommended setting)
ANDROID_HOME=C:\Users\jmunozo\AppData\Local\Android\Sdk (DEPRECATED)
Using Android SDK: C:\Users\jmunozo\AppData\Local\Android\Sdk
Starting a Gradle Daemon (subsequent builds will be faster)
BUILD SUCCESSFUL in 16s
1 actionable task: 1 executed
Subproject Path: CordovaLib
Subproject Path: app
Starting a Gradle Daemon (subsequent builds will be faster)
FAILURE: Build failed with an exception.
What went wrong:
Could not receive a message from the daemon.
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
Command failed with exit code 1: C:\Users\jmunozo\myApp\platforms\android\gradlew cdvBuildDebug -b C:\Users\jmunozo\myApp\platforms\android\build.gradle
[ERROR] An error occurred while running subprocess cordova.
cordova.cmd build android exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.

Related

Flutter taking path of Windows directory on macos

I cloned an existing app from GitHub but the build is not working for that. The path in which error is showing is of windows operating system whereas i am working on a Mac OS. Tried Flutter clean, Pub outdated, Pub Upgrade, deleted build folder but still none of them works.
Launching lib/main.dart on sdk gphone64 x86 64 in debug mode...
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
java.net.URISyntaxException: Illegal character in opaque part at index 2:
D:\ISKCON\volApp\volstoryFlutter\android\app\build\intermediates\flutter\debug\flutter_assets\AssetManifest.json
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

Execution failed for task ':app:compileDebugKotlin'. Make sure Gradle is running on a JDK, not JRE

Installed Android Studio and flutter sdk (downloaded zip and unzip) on my mac. I created new flutter simple project on android studio app and ran it. Then, I got following error message.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugKotlin'.
> Kotlin could not find the required JDK tools in the Java installation '/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home' used by Gradle. Make sure Gradle is running on a JDK, not JRE.
* 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 5s
Exception: Gradle task assembleDebug failed with exit code 1
Error message
cd /Applications/Android\ Studio.app/Contents/jre
ln -s ../jre jdk
ln -s "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin" jdk
flutter doctor -v
I ran above commands in terminal and it is solved.

When i run my flutter app in android studio i got the below error.How can i fix it

FAILURE: Build failed with an exception.
What went wrong:
Gradle could not start your build.
Could not create service of type FileAccessTimeJournal using GradleUserHomeScopeServices.createFileAccessTimeJournal().
java.io.FileNotFoundException: C:\Users\DELL.gradle\caches\journal-1\journal-1.lock (Access is denied)
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 23s
[!] Gradle threw an error while downloading artifacts from the network. Retrying to download...
Running Gradle task 'assembleDebug'...
Had the same problem, these actions worked for me: Close IDE. Go to windows task manager -> processes. Find java.exe processes there and end them.
Or try to these commands:
./gradlew --stop
OR
gradle --stop
Credits

can not generate flutter apk file

I'm trying to generate flutter apk file using the following command
flutter build apk --target-platform=android-arm
but I've got the following error
FAILURE: Build failed with an exception.
What went wrong:
Could not resolve all files for configuration ':app:releaseCompileClasspath'.
Could not download flutter_embedding_release.jar (io.flutter:flutter_embedding_release:1.0.0-e1e6ced81d029258d449bdec2ba3cddca9c2ca0c)
Could not get resource 'http://download.flutter.io/io/flutter/flutter_embedding_release/1.0.0-e1e6ced81d029258d449bdec2ba3cddca9c2ca0c/flutt
er_embedding_release-1.0.0-e1e6ced81d029258d449bdec2ba3cddca9c2ca0c.jar'.
Read timed out
Could not download armeabi_v7a_release.jar (io.flutter:armeabi_v7a_release:1.0.0-e1e6ced81d029258d449bdec2ba3cddca9c2ca0c)
Could not get resource 'http://download.flutter.io/io/flutter/armeabi_v7a_release/1.0.0-e1e6ced81d029258d449bdec2ba3cddca9c2ca0c/armeabi_v7a
_release-1.0.0-e1e6ced81d029258d449bdec2ba3cddca9c2ca0c.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 insigh
ts.
Get more help at https://help.gradle.org
BUILD FAILED in 1m 3s
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done 64.6s
Gradle task assembleRelease failed with exit code 1
how to solve this problem ??

ionic build failed Execution failed for task ':app:processDebugGoogleServices'

I am trying to create ionic build getting an error like:
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:processDebugGoogleServices'.
Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 10.+.
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 34s
20 actionable tasks: 1 executed, 19 up-to-date
/home/user/Documents/project/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:processDebugGoogleServices'.
Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 10.+.
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 34s
[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.
I tried many solutions but unable to solve yet.