Im new to Ionic 2 and I cant build my app, Im using Ionic Version 2.2.3. I already tried different solutions like adding some Environmental Variables but I still cant build. Hope you can help me, thanks in advance. Here is the error in cmd:
ANDROID_HOME=C:\Users\Administrator\AppData\Local\Android\android-sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_131`enter code here`
Subproject Path: CordovaLib
Starting a new Gradle Daemon for this build (subsequent builds will be faster).
FAILURE: Build failed with an exception.
* What went wrong:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at https://docs.gradle.org/
2.14.1/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
Related
I was building a flutter app in a Windows machine and I stopped working on it for several months, after that I now get issues on running the app. It shows those two errors:
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
Where:
Build file 'C:\Users\okeyr\AppData\Local\Pub\Cache\hosted\pub.dev\flutter_tts-3.6.3\android\build.gradle' line: 31
What went wrong:
A problem occurred evaluating project ':flutter_tts'.
org/gradle/api/services/BuildService
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.
Where:
Script 'C:\Program Files\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 463
What went wrong:
A problem occurred configuring project ':flutter_tts'.
Failed to notify project evaluation listener.
Cannot invoke method substring() on null object
compileSdkVersion 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.
==============================================================================
Get more help at https://help.gradle.org
Flutter doctor shows everything fine except:
[X] Visual Studio - develop for Windows
X Visual Studio not installed; this is necessary for Windows development.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components
But I don't think the issue is related with that.
I've I look in depth at failure number 1. I have check the file that gives the error and I found that in line 31:
apply plugin: 'kotlin-android'
So I just went to the file and deleted all the entries related with kotlin, because I am not using Kotlin (I guess).
Then if I rerun the app it now shows another error (related with tts again), but doesn't show the previous ones (not sure if I've moved forward or backwards)
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
C:\Users\okeyr\AndroidStudioProjects\fluttertestapp\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java:24: error: cannot find symbol
flutterEngine.getPlugins().add(new com.tundralabs.fluttertts.FlutterTtsPlugin());
^
symbol: class FlutterTtsPlugin
location: package com.tundralabs.fluttertts
1 error
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
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
BUILD FAILED in 16s
Exception: Gradle task assembleDebug failed with exit code 1
After doing a search I found many people with that similar issue (even though none was related to tts plugin) which had adressed it with a flutter pub cache repair or a flutter clean. However, a flutter clean gives me no changes and error persists and when I have executed flutter pub cache repair it had shown:
Failed to repair flutter_tts 3.6.3. Error:
Pub failed to delete entry because it was in use by another process.
This may be caused by a virus scanner or having a file
in the directory open in another application.
Reinstalled 29 packages.
Failed to reinstall 1 package:
flutter_tts 3.6.3
pub finished with exit code 69
Now, if I rerun the code it gives me new error:
The plugin flutter_tts doesn't have a main class defined in C:\Users\okeyr\AppData\Local\Pub\Cache\hosted\pub.dev\flutter_tts-3.6.3\android\src\main\java\com\tundralabs\fluttertts\FlutterTtsPlugin.java or C:\Users\okeyr\AppData\Local\Pub\Cache\hosted\pub.dev\flutter_tts-3.6.3\android\src\main\kotlin\com\tundralabs\fluttertts\FlutterTtsPlugin.kt. This is likely to due to an incorrect androidPackage: com.tundralabs.fluttertts or mainClass entry in the plugin's pubspec.yaml.
If you are the author of this plugin, fix the androidPackage entry or move the main class to any of locations used above. Otherwise, please contact the author of this plugin and consider using a different plugin in the meanwhile.
This error also appears when running pub get or pug upgrade. But if I run pub outdated it gives me that:
Showing outdated packages.
[*] indicates versions that are not the latest available.
Package Name Current Upgradable Resolvable Latest
direct dependencies: all up-to-date.
transitive dependencies:
characters *1.2.1 *1.2.1 *1.2.1 1.3.0
collection *1.17.0 *1.17.0 *1.17.0 1.17.1
js *0.6.5 *0.6.5 *0.6.5 0.6.7
meta *1.8.0 *1.8.0 *1.8.0 1.9.0
path *1.8.2 *1.8.2 *1.8.2 1.8.3
transitive dev_dependencies:
matcher *0.12.13 *0.12.13 *0.12.13 0.12.14
test_api *0.4.16 *0.4.16 *0.4.16 0.4.18
all dependencies are up-to-date.
Process finished with exit code 0
I can't see any dependency related with tts.
Now here I am stucked in that error, I don't know how to proceed. If there is someone who could help me see the light I'd be grateful. Thanks in advance.
I am trying to run the code but it seems tts package is not well defined, anyone that could bring me some help?
I just downloaded android studio, and when I tried to run a flutter project, I got this on the console:
Launching lib\main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
What went wrong:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the User Manual chapter on the daemon at https://docs.gradle.org/6.7/userguide/gradle_daemon.html
Process command line: C:\Program Files (x86)\Java\jre1.8.0_301\bin\java.exe -Xmx1536M -Dfile.encoding=windows-1252 -Duser.country=BR -Duser.language=pt -Duser.variant -cp C:\Users\pedro.gradle\wrapper\dists\gradle-6.7-all\cuy9mc7upwgwgeb72wkcrupxe\gradle-6.7\lib\gradle-launcher-6.7.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 6.7
Please read the following process output to find out more:
Error occurred during initialization of VM
Could not reserve enough space for 1572864KB object heap
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
Exception: Gradle task assembleDebug failed with exit code 1
I tried to delete my ".gradle" file as was recommended in a similar question, but a new ".gradle" file is created in the same folder whenever I try to run the project.
I am try to compile an new project using command ionic build android, but i get this error:
C:\Users\pedromiguel\aplicacionesIonic\sqliteTest>ionic build android
Running command: "C:\Program Files\nodejs\node.exe" C:\Users\pedromiguel\aplicacionesIonic\sqliteTest\hooks\after_prepare\010_add_platform_class.js C:\Users\pedromiguel\aplicacionesIonic\sqliteTest
add to body class: platform-android
ANDROID_HOME=C:\Users\pedromiguel\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_101
Subproject Path: CordovaLib
FAILURE: Build failed with an exception.
* What went wrong:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at http://gradle.org/docs/2.2.1/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap
* Try:
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:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at http://gradle.org/docs/2.2.1/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
System info
C:\Users\pedromiguel\aplicacionesIonic\sqliteTest>ionic info
Your system information:
ordova CLI: 6.4.0
Ionic CLI Version: 2.1.17
Ionic App Lib Version: 2.1.7
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v5.5.0
Xcode version: Not installed
I tried multiples solution's, i find it these the follow question:
Link 1
Your path should be wrong .Check your java setup first. Refer following link https://forum.ionicframework.com/t/unable-to-start-the-daemon-process/34301/5
If it will not work then change gradle.property by
Open Android Studio then go to gradle.properties file and change the last line to
org.gradle.jvmargs=-Xmx1024m.
And then press try again . Refer Android Studio Gradle project "Unable to start the daemon process /initialization of VM"
I fixed this problem by replacing complete Gradle file with original gradle file.It worked for me.
Whenever I try to open any downloaded project in android studio it always gives me error given below
Error:Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at http://gradle.org/docs/2.2/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
15:10:36.821 [main] DEBUG o.g.l.daemon.bootstrap.DaemonMain - Assuming the daemon was started with following jvm opts: [-XX:MaxPermSize=256m, -XX:+HeapDumpOnOutOfMemoryError, -Xmx1024m, -Dfile.encoding=windows-1252, -Duser.country=US, -Duser.language=en, -Duser.variant]
FAILURE: Build failed with an exception.
* What went wrong:
Could not create service of type DaemonContext using DaemonServices.createDaemonContext().
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
I have tried many setting changes but nothing helped please someone suggest me the solution
I created an Android platform with success, but when I run
ionic build android
I get the following error:
FAILURE: Build failed with an exception.
* What went wrong:
Could not create an instance of type org.gradle.invocation.DefaultGradle_Decorated.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
ERROR building one of the platforms: Error code 1 for command: /home/skylek/Ionic/conFusion/platforms/android/gradlew with args: cdvBuildDebug,-b,/home/skylek/Ionic/conFusion/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: /home/skylek/Ionic/conFusion/platforms/android/gradlew with args: cdvBuildDebug,-b,/home/skylek/Ionic/conFusion/platforms/android/build.gradle,-Dorg.gradle.daemon=true,-Pandroid.useDeprecatedNdk=true
Can anyone help me out.
I had exactly the same problem with an ionic project build with the m-ionic yeoman generator, that was uploaded to the ionic cloud.
It started after my computer crashed with a 'blue screen of death', in the middle of a compilation task
What We did to fix the project was to copy and replacing the gradle and corodova files :
.gradle
cordova
CordovaLib
gradle
gradlew.bat
from other ionic>platform>android project that I knew was working fine, beacuse we thought the Cordova files might be corrupted, and early in the project we fixed a similar compilation problem that way. It did not fixed the problem. But then removed the ionic cloud configuration files: ionic.project .
And it worked!!
I hope it could help you!