After installed of new Windows and Andriod Studio,the existing project cannot run now. Please help!
The error message is as below.
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.1.1/userguide/gradle_daemon.html
Process command line:
C:\Users\samkong.jdks\corretto-1.8.0_322\bin\java.exe
--add-opens=java.base/java.io=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED -Xmx2048m--add-exports=java.base/sun.nio.ch=ALL-UNNAMED -Dfile.encoding=x-windows-950 -Duser.country=HK -Duser.language=zh -Duser.variant -cp D:\Android\DeliveryApp api level24\wrapper\dists\gradle-6.1.1-all\cfmwm155h49vnt3hynmlrsdst\gradle-6.1.1\lib\gradle-launcher-6.1.1.jar
org.gradle.launcher.daemon.bootstrap.GradleDaemon 6.1.1 Please read
the following process output to find out more:
----------------------- Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.
Unrecognized option: --add-opens=java.base/java.io=ALL-UNNAMED
----------------------- Check the JVM arguments defined for the gradle process in:
gradle.properties in project root directory
Related
I Updated my Android Studio and as well I keep getting this error when I launch any project ...
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.1/userguide/gradle_daemon.html
Process command line: C:\Program Files\Android\Android Studio\jre\bin\java.exe --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.invoke=ALL-UNNAMED --add-opens java.prefs/java.util.prefs=ALL-UNNAMED -Xmx2048m -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -cp C:\Users\Nerd\.gradle\wrapper\dists\gradle-6.7.1-bin\bwlcbys1h7rz3272sye1xwiv6\gradle-6.7.1\lib\gradle-launcher-6.7.1.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 6.7.1
Please read the following process output to find out more:
-----------------------
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x0000000080000000, 268435456, 0) failed; error='The paging file is too small for this operation to complete' (DOS error/errno=1455)
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 268435456 bytes for Failed to commit area from 0x0000000080000000 to 0x0000000090000000 of length 268435456.
# An error report file with more information is saved as:
# C:\Users\Nerd\.gradle\daemon\6.7.1\hs_err_pid21920.log
-----------------------
Check the JVM arguments defined for the gradle process in:
- gradle.properties in project root directory
I thought maybe my C: drive has insufficient space but I cleaned lost of unuseful files.
and I can't figure out why my C: drive had 32 GB Space and while Gradle is Building it's just becomes Low space and when the Gradle synch finish unsuccessfully it has 7.2 GB space!
I just recently install Unity game engine and used the Android Studio SDK directory as well. I don't know if it doesn't have any relation with the problem, but that's whole the contemporary changes to my computer.
Any Idea other than uninstalling and reinstalling Android Studio will be appreciated.
Your error states that the daemon exited because there was insufficient memory. Here, it is referring to the RAM, and not the hard disk. Add this to gradle.properties file, create one if it's not present,
org.gradle.jvmargs=-Xms512M -Xmx5G
I m trying to execute handtracking android app using bazel and when I run the build command I get this error :
can you help me fix it please
ERROR: C:/users/admin/mediapipe_repo/mediapipe/mediapipe/framework/formats/BUILD:251:24: C++ compilation of rule '//mediapipe/framework/formats:landmark_cc_proto' failed (Exit 1): clang fai
led: error executing command external/androidndk/ndk/toolchains/llvm/prebuilt/windows-x86_64/bin/clang -gcc-toolchain external/androidndk/ndk/toolchains/aarch64-linux-android-4.9/prebuilt/w
indows-x86_64 -target ... (remaining 57 argument(s) skipped)
clang: error: no such file or directory: '/w'
clang: error: no such file or directory: '/D_USE_MATH_DEFINES'
clang: error: no such file or directory: '/std:c++17'
Target //mediapipe/examples/android/src/java/com/google/mediapipe/apps/handtrackinggpu:handtrackinggpu failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 151.344s, Critical Path: 132.86s
INFO: 160 processes: 128 internal, 31 local, 1 worker.
FAILED: Build did NOT complete successfully
There is a note in the Mediapipe documentation:
Note: building MediaPipe Android apps is still not possible on native Windows. Please do this in WSL instead and see the WSL setup instruction in the next section.
This implies that what you are trying to do is currently not possible, sorry. See also this issue for other people in your situation.
I am trying to follow a tutorial to build an Android app using Bazel as given here:
https://docs.bazel.build/versions/master/tutorial/android-app.html. The app is being built successfully with the command:
bazel build //src/main:app
However, when I try to run the app using the command bazel mobile-install //src/main:app the build is failing with the following error:
INFO: Analyzed target //src/main:app (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /Users/kanzashaikh/examples/android/tutorial/src/main/BUILD:1:15: Installing //src/main:app failed: (Exit 1): incremental_install failed: error executing command bazel-out/darwin-py2-opt-exec-2B5CBBC6/bin/external/bazel_tools/tools/android/incremental_install --output_marker bazel-out/darwin-fastbuild/bin/src/main/app_files/full_deploy_marker --dexmanifest ... (remaining 11 argument(s) skipped)
Traceback (most recent call last):
File "/private/var/tmp/_bazel_kanzashaikh/df06cea5303c222cca918b7a24c9d8ca/execroot/main/bazel-out/darwin-py2-opt-exec-2B5CBBC6/bin/external/bazel_tools/tools/android/incremental_install.runfiles/bazel_tools/tools/android/incremental_install.py", line 25, in
from concurrent import futures
ImportError: No module named concurrent
Target //src/main:app failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.311s, Critical Path: 0.19s
INFO: 3 processes: 3 internal.
FAILED: Build did NOT complete successfully
How to solve this issue?
It looks like bazel is using python2 (the py2 from darwin-py2-opt-exec-2B5CBBC6 from the file paths), but from concurrent import futures in incremental_install.py doesn't work in python2.
If you don't have python3 installed, try installing it and seeing if that fixes the problem.
If you do have python3 installed, then check your bazel version, older versions of bazel might be defaulting to python2.
I was having an error that is Camera not successful invoked on first try (click) so I tried this solution on stackoverflow Phonegap(3.0.0) Camera not successful on first try.
I followed the steps as mentioned in the answer removed android by cordova platform remove android then I run the second command cordova platform add android ;
Now when I use netbeans to run the cordova application on cordova android decvice this error occurs:
exec: ant debug -f "/var/www/mobile/platforms/android/build.xml"
[ 'ant debug -f "/var/www/mobile/platforms/android/build.xml"',
{ [Error: Command failed:
BUILD FAILED
/var/www/adt-bundle-linux-x86_64-20130917/sdk/tools/ant/build.xml:720: The following error occurred while executing this line:
/var/www/adt-bundle-linux-x86_64-20130917/sdk/tools/ant/build.xml:734: Compile failed; see the compiler error output for details.
Total time: 8 seconds
] killed: false, code: 1, signal: null },
'Buildfile: /var/www/mobile/platforms/android/build.xml\n\n-set-mode-check:\n\n-set-debug-files:\n\n-check-env:\n [checkenv] Android SDK Tools Revision 22.3.0\n [checkenv]
.
.
.**LONG TEXT which I removed from the post **
.
\nBUILD FAILED\n/var/www/adt-bundle-linux-x86_64-20130917/sdk/tools/ant/build.xml:720:
The following error occurred while executing this line:\n/var/www/adt-bundle-linux-x86_64- 20130917/sdk/tools/ant/build.xml:734:
Compile failed; see the compiler error output for details.\n\nTotal time: 8 seconds\n' ]
Error executing "ant debug -f "/var/www/mobile/platforms/android/build.xml"":
BUILD FAILED
/var/www/adt-bundle-linux-x86_64-20130917/sdk/tools/ant/build.xml:720: The following error occurred while executing this line:
/var/www/adt-bundle-linux-x86_64-20130917/sdk/tools/ant/build.xml:734: Compile failed; see the compiler error output for details.
Total time: 8 seconds
child_process.spawn(/var/www/mobile/platforms/android/cordova/build,[]) = 2
/usr/local/lib/node_modules/cordova/node_modules/q/q.js:126
throw e;
Error: An error occurred while building the android project.Error executing "ant debug -f "/var/www/mobile/platforms/android/build.xml"":
BUILD FAILED
/var/www/adt-bundle-linux-x86_64-20130917/sdk/tools/ant/build.xml:720: The following error occurred while executing this line:
/var/www/adt-bundle-linux-x86_64-20130917/sdk/tools/ant/build.xml:734: Compile failed; see the compiler error output for details.
Total time: 8 seconds
at ChildProcess.<anonymous> (/usr/local/lib/node_modules/cordova/src/compile.js:65:22)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Socket.<anonymous> (child_process.js:948:11)
at Socket.EventEmitter.emit (events.js:95:17)
at Pipe.close (net.js:466:12)
/var/www/mobile/nbproject/build.xml:256: exec returned: 8
BUILD FAILED (total time: 4 minutes 36 seconds)
any idea about this problem?
I was having a similar issue. I ran ant debug -f "/path/to/project/build.xml" from a separate terminal. It displayed a more specific description of the error (which for me wast that there was a space in the project name). This answer also notes:
config.xml can't have a widget id with number as a first character
after a dot. For example: com.42myapp.test or com.myapp.42test won't
work as well as 42com.myapp.test. It will trigger an error from the
compiler.
I was facing similar issues when i started using the CLI to build apps using cordova and started checking the internet for solutions. While i was at it, i discovered the following things that may help you or anyone else facing the same problem can take some hints from this:
These are some very basic checks that you need to take
1. make sure you have all the required sdk's in place (ANT, Java, Android) and is available when you use these commands on the terminal/command $ ant $ java $ adt. if any of these commands are not found, then you need to get it installed or get the class paths fixed.
make sure your project path does not have spaces. i.e. do not have spaces or special characters in directory names. this issue seems to have been fixed on latest versions of cordova and phonegap, but either cases it is a good practice to follow as ant and java paths could be dependent on the folder names you make.
use -d or -v to get extra debug information on the build process to know where and what is causing the issue. $ cordova build android -d or $ cordova build android -v
Make sure you dont use "#" as the link attribute of author tag in the cordova config.xml on the root of the project. This expects the compiler to interpret a hexadecimal color and fails the build. (this was my problem)
Hope this helps.
er... Happy debugging??
Make sure your Ant is 1.8.0 or later version. Cordova 3.3 demands that.
In the past several days, I found that the conflicting files from Dropbox had a very long name. After renaming it, everything worked.
I can't build Android + Scala (and IntelliJ Idea 12) project using sbt and sbt-android plugin. I installed everything needed and added ANDROID_SDK_HOME to both .bashrc and /etc/profile but:
me123#ubuntu:~/Documents/android_projects/my-android-project$ echo $ANDROID_SDK_HOME
/home/me123/android-sdk-linux/sdk
me123#ubuntu:~/Documents/android_projects/my-android-project$ sudo echo $ANDROID_SDK_HOME
/home/me123/android-sdk-linux/sdk
me123#ubuntu:~/Documents/android_projects/my-android-project$ sbt
[info] Loading global plugins from /home/me123/.sbt/plugins
[info] Loading project definition from /home/me123/Documents/android_projects/my-android-project/project
[info] Compiling 3 Scala sources to /home/me123/Documents/android_projects/my-android-project/project/target/scala-2.9.2/sbt-0.12/classes...
[error] /home/me123/Documents/android_projects/my-android-project/project/target/scala-2.9.2/sbt-0.12/classes/AndroidEclipse$Transformer.class (Permission denied)
[error] one error found
[error] (compile:compile) Compilation failed
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? q
me123#ubuntu:~/Documents/android_projects/my-android-project$ sudo sbt
[info] Loading project definition from /home/me123/Documents/android_projects/my-android-project/project
[info] Updating {file:/home/me123/Documents/android_projects/my-android-project/project/}default-6ff5da...
[info] Resolving org.scala-sbt#precompiled-2_10_0;0.12.2 ...
[info] Done updating.
[error] Android SDK not found. You might need to set ANDROID_SDK_HOME or ANDROID_SDK_ROOT or ANDROID_HOME
[error] Use 'last' for the full log.
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? q
UPDATE:
> android:start-device
[info] Wrote /home/alex/Documents/android_projects/my-android-project/target/scala-2.10/src_managed/main/scala/my/android/project/TR.scala
[info] Compiling 2 Scala sources and 1 Java source to /home/alex/Documents/android_projects/my-android-project/target/scala-2.10/classes...
[warn] there were 4 feature warnings; re-run with -feature for details
[warn] one warning found
ProGuard, version 4.6
ProGuard is released under the GNU General Public License. You therefore
must ensure that programs that link to it (scala, ...)
carry the GNU General Public License as well. Alternatively, you can
apply for an exception with the author of ProGuard.
Reading program directory [/home/alex/Documents/android_projects/my-android-project/target/scala-2.10/classes]
[trace] Stack trace suppressed: run last main/android:proguard for the full output.
[error] (main/android:proguard) java.io.IOException: Can't read [/home/alex/Documents/android_projects/my-android-project/target/scala-2.10/classes] (Can't process class [my/android/project/R$id.class] (Unsupported version number [51.0] for class format))
[error] Total time: 14 s, completed May 30, 2013 3:49:46 PM
First, doing sudo echo $ANDROID_HOME will be exactly the same as echo $ANDROID_HOME, because the variable will be replaced by your shell before executing the command.
Then, you most likely have a permission problem. Try running this to make sure you have the right ones :
$ chmod -Rv 700 /home/me123/Documents/android_projects/my-android-project/