I'm having an issue that's taking me since yesterday morning to figure it out with no success. I'm really desperate right now to solve this.
In the log console, at the bottom of the Android-Studio window I get this error:
Error: Gradle: Execution failed for task':MyApplication2:mergeDebugResources'.
>java.io.IOException: Cannot run program "/home/user/.local/android-studio/sdk/build-tools/android-4.2.2/aapt": error=2, No such file or directory
But happens that the file is there. I've done some research with no success. I'm taking so much time on this. I don't know why this should be wrong. I'm on Linux.
Please help me resolving this issue.
EDIT:
On Processing IDE the exact same error happens:
BUILD FAILED
/home/user/adt-bundle-linux-x86_64-20130729/sdk/tools/ant/build.xml:649: The following error occurred while executing this line:
/home/user/adt-bundle-linux-x86_64-20130729/sdk/tools/ant/build.xml:690: Execute failed: java.io.IOException: Cannot run program "/home/user/adt-bundle-linux-x86_64-20130729/sdk/build-tools/18.0.1/aapt" (in directory "/tmp/android8933435574063638939sketch"): java.io.IOException: error=2, No such file or directory
Try to install the following:
sudo apt-get --no-install-recommends install ia32-libs-multiarch
Related
My java program is running fine on my Eclipse IDE, but when am trying to run the same ".java" file using my command prompt it is showing me an error as shown in the fig.
Error: Could not find or load main class EulerianPathDirectedEdgesAdjacencyList
Caused by: java.lang.NoClassDefFoundError: com/euler/EulerianPathDirectedEdgesAdjacencyList (wrong name: EulerianPathDirectedEdgesAdjacencyList)
While am running the same code in my Eclipse IDE its working fine!
Please let me know, how to solve this.
Thanks!
Try running the command : java com.euler.EulerianPathDirectedEdgesAdjacencyList from the same directory where class file got created after running the previous javac command
When I run cordova build android I had error.
exit /b 1 Command finished with error code 1:\platforms\android\gradlew cdvBuildDebug,-b,myprodplatforms\android\build.gradle myprodplatforms\android\gradlew: Command failed with exit code 1 Error output: Exception in thread "main" java.lang.NullPointerException
at org.gradle.wrapper.PathAssembler.getDistName(PathAssembler.java:84)
at
org.gradle.wrapper.PathAssembler.getDistribution(PathAssembler.java:40)
at org.gradle.wrapper.Install.createDist(Install.java:44)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:63) Error: myprodplatforms\android\gradlew: Command failed with exit code 1 Error output: Exception in thread "main" java.lang.NullPointerException
at org.gradle.wrapper.PathAssembler.getDistName(PathAssembler.java:84)
at org.gradle.wrapper.PathAssembler.getDistribution(PathAssembler.java:40)
at org.gradle.wrapper.Install.createDist(Install.java:44)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:63)
at ChildProcess.whenDone (myprodnode_modules\cordova-common\src\superspawn.js:135:23)
at ChildProcess.emit (events.js:210:5)
at ChildProcess.cp.emit (myprodnode_modules\cross-spawn\lib\enoent.js:34:29)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5) [ERROR] An error occurred while running subprocess cordova.
cordova.cmd build android --verbose exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
I tried to remove and add android remove node modules, I updated node module to latest version .
Can someone give me idea how to solved error.
Ivan, One thing seems typo, the command is ionic cordova build android, you have mentioned only cordova build android command, ionic is missing.
It seems your error is more related to Android Studio/Gradle installation not related to node module or ionic. still as per error mentioned which itself suggests please run build command with --verbose flag as below.
ionic cordova build android --verbose
the --verbose flag may help you to give exact Gradle or specific component associated error, which can further help you to reach to the specific root cause.
Please run ionic cordova build android instead of cordova build android to get APK and run ionic cordova build ios to get IPA
I'm dying trying to figure this out!
Essentially, I've finished up an Ionic app and am ready to publish it to the Google Play Store. The problem is that I'm having trouble following the directions posted on the Ionic Framework website.
So far, I've created an 'android' folder under 'platforms'.
Error thrown:
Android Studio project detected
ANDROID_HOME=C:\Users\fromf\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files (x86)\java\jdk1.8.0_191
studio
Subproject Path: CordovaLib
Subproject Path: app
Starting a Gradle Daemon (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/4.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.
Get more help at https://help.gradle.org
(node:43720) UnhandledPromiseRejectionWarning: Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
My various attempts:
Firstly, that I cannot seem to find the 'build' folder referenced at 'platforms/android/build/outputs/apk'. It simply does not exist.
Having recognised that I'm lacking the 'build' folder, I attempted to change the environment variables according to this website: http://www.tiagoporto.com/blog/environment-setting-tutorial-ionic-android-on-windows/. This did not work.
I followed the directions given on various SoF Q&As, and manually downloaded the needed gradle, called "gradle-2.2.1-all.zip". Still did not work.
I am at my wits ends. Please please please help!
I m trying to run a Spark maven Scala project.
the mvn install didn't succeded (java.lang.UnsatisfiedLinkError) :
*** RUN ABORTED ***
java.lang.UnsatisfiedLinkError: org.apache.hadoop.io.nativeio.NativeIO$Windows.access0(Ljava/lang/String;I)Z
at org.apache.hadoop.io.nativeio.NativeIO$Windows.access0(Native Method)
at org.apache.hadoop.io.nativeio.NativeIO$Windows.access(NativeIO.java:609)
at org.apache.hadoop.fs.FileUtil.canWrite(FileUtil.java:996)
at org.apache.hadoop.hdfs.server.common.Storage$StorageDirectory.analyzeStorage(Storage.java:490)
at org.apache.hadoop.hdfs.server.namenode.FSImage.recoverStorageDirs(FSImage.java:321)
at org.apache.hadoop.hdfs.server.namenode.FSImage.recoverTransitionRead(FSImage.java:215)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.loadFSImage(FSNamesystem.java:976)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.loadFromDisk(FSNamesystem.java:681)
at org.apache.hadoop.hdfs.server.namenode.NameNode.loadNamesystem(NameNode.java:584)
at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:643)
at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:810)
at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:794)
at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1487)
I didn't understand the cause of the error since the Hadoop path is set and contains winutils.exe , and i have already run another java-spark project successfully ?
I just added hadoop.dll To the hadoop path and the error disappear.
I have been trying to setup run my first react native project and have followed the steps provided here. But i keep getting this error when i run
$ react-native run-android
what i get is this
Starting JS server...
Building and installing the app on the device (cd android && ./gradlew installDebug)...
Unzipping /home/webshinobis/.gradle/wrapper/dists/gradle-2.4-all/6r4uqcc6ovnq6ac6s0txzcpc0/gradle-2.4-all.zip to /home/webshinobis/.gradle/wrapper/dists/gradle-2.4-all/6r4uqcc6ovnq6ac6s0txzcpc0
Exception in thread "main" java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:219)
at java.util.zip.ZipFile.<init>(ZipFile.java:149)
at java.util.zip.ZipFile.<init>(ZipFile.java:163)
at org.gradle.wrapper.Install.unzip(Install.java:159)
at org.gradle.wrapper.Install.access$500(Install.java:26)
at org.gradle.wrapper.Install$1.call(Install.java:69)
at org.gradle.wrapper.Install$1.call(Install.java:46)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
at org.gradle.wrapper.Install.createDist(Install.java:46)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:126)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
I have searched and all i have seen so far are genymotion user solutions.
Any idea on how to fix this?
Oh, i found the error, the zip file in
/home/webshinobis/.gradle/wrapper/dists/gradle-2.4-all/6r4uqcc6ovnq6ac6s0txzcpc0/gradle-2.4-all.zip
was corrupt that's y it could not be unzipped by the java.
So I have to go into the folder and delete the zip file mannualy and then run
react-native run-android
again. Hope that helps someone else. This is usually due to internet connection issues.
Set your ANDROID_HOME environment variables. Check your adb devices first. If your device is available. See the cyprusglobe suggestion.
Run:
- chmod 755 android/gradlew
- react-native run-android