I try to build a android app with android studio. Gradle throws this error when i try to build:
Gradle invocation completed successfully with 1 error(s) in 10 sec
and the message gradle build window shows:
Error:Execution failed for task
':SlidingUpPanelLayout:processReleaseResources'.
java.io.IOException: Cannot run program "/home/[...]/android-studio/sdk/build-tools/19.0.2/aapt": error=2, No
such file or directory
but ls -l shows me this files:
~/development/android-studio/sdk/build-tools/19.0.2$ ls -l
total 49348
-rwxr-xr-x 1 david david 1109734 Apr 12 12:29 aapt
-rwxr-xr-x 1 david david 271551 Apr 12 12:29 aidl
-rwxr-xr-x 1 david david 3570836 Apr 12 12:29 arm-linux-androideabi-ld
-rwxr-xr-x 1 david david 36534 Apr 12 12:29 bcc_compat
-rwxr-xr-x 1 david david 445402 Apr 12 12:29 dexdump
-rwxr-xr-x 1 david david 2577 Apr 12 12:29 dx
-rwxr-xr-x 1 david david 3570836 Apr 12 12:29 i686-linux-android-ld
drwxr-xr-x 2 david david 4096 Apr 12 12:29 lib
-rwxr-xr-x 1 david david 332357 Apr 12 12:29 libbcc.so
-rwxr-xr-x 1 david david 932160 Apr 12 12:29 libbcinfo.so
-rwxr-xr-x 1 david david 15372369 Apr 12 12:29 libclang.so
-rwxr-xr-x 1 david david 21101517 Apr 12 12:29 libLLVM.so
-rwxr-xr-x 1 david david 1667769 Apr 12 12:29 llvm-rs-cc
-rwxr-xr-x 1 david david 1919720 Apr 12 12:29 mipsel-linux-android-ld
-rw-r--r-- 1 david david 10800 Apr 12 12:29 NOTICE.txt
drwxr-xr-x 5 david david 4096 Apr 12 12:29 renderscript
-rw-r--r-- 1 david david 16649 Apr 12 12:29 source.properties
why say gradle the the aapt is not a file? whats wrong with it?
this helped me link
sudo apt-get install lib32stdc++6
sudo apt-get install lib32z1
Related
When I run the command I got the error:
root#1290ff36814b:/opt/airflow/dags# python test.py
/opt/spark-3.3.1/bin/spark-class: line 71: /opt/jdk1.8.0/bin/java: No such file or directory
/opt/spark-3.3.1/bin/spark-class: line 96: CMD: bad array subscript
Traceback (most recent call last):
File "test.py", line 16, in <module>
.appName('test') \
File "/opt/spark-3.3.1/python/pyspark/sql/session.py", line 269, in getOrCreate
sc = SparkContext.getOrCreate(sparkConf)
File "/opt/spark-3.3.1/python/pyspark/context.py", line 483, in getOrCreate
SparkContext(conf=conf or SparkConf())
File "/opt/spark-3.3.1/python/pyspark/context.py", line 195, in __init__
SparkContext._ensure_initialized(self, gateway=gateway, conf=conf)
File "/opt/spark-3.3.1/python/pyspark/context.py", line 417, in _ensure_initialized
SparkContext._gateway = gateway or launch_gateway(conf)
File "/opt/spark-3.3.1/python/pyspark/java_gateway.py", line 106, in launch_gateway
raise RuntimeError("Java gateway process exited before sending its port number")
RuntimeError: Java gateway process exited before sending its port number
This is a docker container and /opt/jdk1.8.0 is a volume, and the volume is visible inside container and also de java binary.
root#1290ff36814b:/opt/airflow/dags# ls -l /opt/jdk1.8.0/bin/java
-rwxr-xr-x 1 uucp 143 8464 Dec 15 2018 /opt/jdk1.8.0/bin/java
root#1290ff36814b:/opt/airflow/dags# ls -l /opt/jdk1.8.0/
total 25996
-r--r--r-- 1 uucp 143 3244 Dec 15 2018 COPYRIGHT
-r--r--r-- 1 uucp 143 40 Dec 15 2018 LICENSE
-r--r--r-- 1 uucp 143 159 Dec 15 2018 README.html
-rw-r--r-- 1 uucp 143 112724 Dec 12 2018 THIRDPARTYLICENSEREADME-JAVAFX.txt
-r--r--r-- 1 uucp 143 153824 Dec 15 2018 THIRDPARTYLICENSEREADME.txt
drwxr-xr-x 2 uucp 143 4096 Dec 15 2018 bin
drwxr-xr-x 3 uucp 143 132 Dec 15 2018 include
-rw-r--r-- 1 uucp 143 5211154 Dec 12 2018 javafx-src.zip
drwxr-xr-x 5 uucp 143 4096 Dec 15 2018 jre
drwxr-xr-x 5 uucp 143 4096 Dec 15 2018 lib
drwxr-xr-x 4 uucp 143 47 Dec 15 2018 man
-rw-r--r-- 1 uucp 143 424 Dec 15 2018 release
-rw-r--r-- 1 uucp 143 21105955 Dec 15 2018 src.zip
root#1290ff36814b:/opt/airflow/dags#
Why this happen?
I already tried to set JAVA_HOME and PATH, but still the same problem.
I just realize it has one space inside my python code where I export the JAVA_HOME. After remove it finally the code worked.
import os
import sys
os.environ["SPARK_HOME"]='/opt/spark-3.3.1'
os.environ["JAVA_HOME"]=' /opt/jdk1.8.0'
sys.path+=[os.environ["SPARK_HOME"]+"/python"]
sys.path+=[os.environ["SPARK_HOME"]+"/python/build"]
sys.path+=[os.environ["SPARK_HOME"]+"/python/lib/py4j-0.10.9.5-src.zip"]
I've got a relatively simple jar-with-dependencies being built with Maven that is way larger than it seems like it should be. It's around 20MB, and in order to figure out what's taking up so much space, I've done the following:
First, I ran mvn dependency:tree. Then I checked in my .m2 cache for the size of each of the jars in the dependency tree. If I add up all of those sizes, it comes to about 8MB. How can I figure out where the other 12MB are coming from?
One thing I noticed in looking through my .m2 was that for many of the dependencies, they'll have something like this:
total 5224
-rw-r--r-- 1 user 289B Jul 25 2016 _remote.repositories
-rw-r--r-- 1 user 1.7M Jul 25 2016 commons-compress-1.12-javadoc.jar
-rw-r--r-- 1 user 407B Jul 25 2016 commons-compress-1.12-javadoc.jar.lastUpdated
-rw-r--r-- 1 user 40B Jul 25 2016 commons-compress-1.12-javadoc.jar.sha1
-rw-r--r-- 1 user 427K Jul 25 2016 commons-compress-1.12-sources.jar
-rw-r--r-- 1 user 407B Jul 25 2016 commons-compress-1.12-sources.jar.lastUpdated
-rw-r--r-- 1 user 40B Jul 25 2016 commons-compress-1.12-sources.jar.sha1
-rw-r--r-- 1 user 432K Jul 22 2016 commons-compress-1.12.jar
-rw-r--r-- 1 user 407B Jul 22 2016 commons-compress-1.12.jar.lastUpdated
-rw-r--r-- 1 user 40B Jul 22 2016 commons-compress-1.12.jar.sha1
-rw-r--r-- 1 user 13K Jul 22 2016 commons-compress-1.12.pom
-rw-r--r-- 1 user 407B Jul 22 2016 commons-compress-1.12.pom.lastUpdated
-rw-r--r-- 1 user 40B Jul 22 2016 commons-compress-1.12.pom.sha1
What are the -sources and -javadoc jars? Are those included in my uber jar? Because if every one of my dependencies uses the -javadoc jar instead of the standard one, that gets me a lot closer to 20MB.
Run
jar tvvf <your_simple-jar-with-dependencies.jar>
Or, open it with any zip compatible archiver and examine the contents to determine what is being included. Alternatively, run maven with -X for more extensive runtime information.
When I do
bin/zkServer.sh start #It shows it has started
ZooKeeper JMX enabled by default
Using config: /data/sparkHA/zookeeper-3.4.9/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
Afetr few second when i check status, I got
ZooKeeper JMX enabled by default
Using config: /data/sparkHA/zookeeper-3.4.9/bin/../conf/zoo.cfg
Error contacting service. It is probably not running.
My zookeeper.out says
nohup: failed to run command â/usr/bin/java/bin/javaâ: Not a directory
But my JAVA_HOME in bashrc is usr/bin/java, How come one extra /bin/java is added , that results in an invalid directory.
Also echo $JAVA_HOME outputs
/usr/bin/java
How to approach this error. Please Help. Thanks.
Also tried setting JAVA_HOME in zkServer.sh also by following Zookeeper not starting, nohup error but getting same error.
Your JAVA_HOME point to /usr/bin/java file but it should point to root directory of your JDK. For example for me this is:
➜ ~ echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home
➜ ~ ll $JAVA_HOME
total 52064
-rw-rw-r-- 1 root wheel 3.2K Oct 1 09:00 COPYRIGHT
-rw-rw-r-- 1 root wheel 40B Oct 1 09:01 LICENSE
-rw-rw-r-- 1 root wheel 159B Oct 1 09:01 README.html
-rwxrwxr-x 1 root wheel 108K Sep 22 22:49 THIRDPARTYLICENSEREADME-JAVAFX.txt
-rw-rw-r-- 1 root wheel 173K Oct 1 09:01 THIRDPARTYLICENSEREADME.txt
drwxrwxr-x 46 root wheel 1.5K Oct 1 09:04 bin
drwxrwxr-x 9 root wheel 306B Oct 1 09:00 db
drwxrwxr-x 9 root wheel 306B Oct 1 09:00 include
-rwxrwxr-x 1 root wheel 4.9M Sep 22 22:49 javafx-src.zip
drwxrwxr-x 10 root wheel 340B Oct 1 09:02 jre
drwxrwxr-x 14 root wheel 476B Oct 1 09:02 lib
drwxrwxr-x 5 root wheel 170B Oct 1 09:01 man
-rw-rw-r-- 1 root wheel 529B Oct 1 09:01 release
-rw-rw-r-- 1 root wheel 20M Oct 1 09:01 src.zip
So, try to set valid path to JDK root directory. I think it should fix your problem.
Anyone can tell me where can I find the full version of JFreeChart? I downloaded the JCommon and JFreeChart as well (from the sourceforge page), but the JFreeChart contains only the jfreechart-demo.jar, so even if I correctly added the libraries in Eclipse, it doesn't work either...
Many Thanks!
When unpacked, the required JAR files are in the lib directory.
$ ls -ln lib
total 5800
-rw-r--r--# 1 501 20 45024 Jul 31 2014 hamcrest-core-1.3.jar
-rw-r--r--# 1 501 20 330246 Jul 31 2014 jcommon-1.0.23.jar
-rw-r--r--# 1 501 20 13796 Jul 31 2014 jfreechart-1.0.19-experimental.jar
-rw-r--r--# 1 501 20 79793 Jul 31 2014 jfreechart-1.0.19-swt.jar
-rw-r--r--# 1 501 20 1570157 Jul 31 2014 jfreechart-1.0.19.jar
-rw-r--r--# 1 501 20 50769 Jul 31 2014 jfreesvg-2.0.jar
-rw-r--r--# 1 501 20 245039 Jul 31 2014 junit-4.11.jar
-rw-r--r--# 1 501 20 445025 Jul 31 2014 orsoncharts-1.4-eval-nofx.jar
-rw-r--r--# 1 501 20 72444 Jul 31 2014 orsonpdf-1.6-eval.jar
-rw-r--r--# 1 501 20 80054 Jul 31 2014 servlet.jar
-rw-r--r--# 1 501 20 17492 Jul 31 2014 swtgraphics2d.jar
For example, the following command line runs TimeSeriesChartDemo1 on Unix; separate class path entries with a semicolon (;) on Windows.
$ java -cp .:lib/* org.jfree.chart.demo.TimeSeriesChartDemo1
If Java application requires certain JRE version then how can I check its availability on Mac OS X during installation?
It should be as simple as looking at /System/Library/Frameworks/JavaVM.framework/Versions/
E.g. from my machine:
manoa:~ stu$ ll /System/Library/Frameworks/JavaVM.framework/Versions/
total 56
774077 lrwxr-xr-x 1 root wheel 5 Jul 23 15:31 1.3 -> 1.3.1
167151 drwxr-xr-x 3 root wheel 102 Jan 14 2008 1.3.1
167793 lrwxr-xr-x 1 root wheel 5 Feb 21 2008 1.4 -> 1.4.2
774079 lrwxr-xr-x 1 root wheel 3 Jul 23 15:31 1.4.1 -> 1.4
166913 drwxr-xr-x 8 root wheel 272 Feb 21 2008 1.4.2
168494 lrwxr-xr-x 1 root wheel 5 Feb 21 2008 1.5 -> 1.5.0
166930 drwxr-xr-x 8 root wheel 272 Feb 21 2008 1.5.0
774585 lrwxr-xr-x 1 root wheel 5 Jul 23 15:31 1.6 -> 1.6.0
747415 drwxr-xr-x 8 root wheel 272 Jul 23 10:24 1.6.0
167155 drwxr-xr-x 8 root wheel 272 Jul 23 15:31 A
776765 lrwxr-xr-x 1 root wheel 1 Jul 23 15:31 Current -> A
774125 lrwxr-xr-x 1 root wheel 3 Jul 23 15:31 CurrentJDK -> 1.5
manoa:~ stu$
This artical may help:
http://developer.apple.com/technotes/tn2002/tn2110.html
Summery:
String javaVersion = System.getProperty("java.version");
if (javaVersion.startsWith("1.4")) {
// New features for 1.4
}