roadlabs / simple

Automatically exported from code.google.com/p/simple
0 stars 0 forks source link

Cannot compile #11

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
(In command prompt)
1.newsimpleproject com.mydomain.test.Test
(no source files have been edited)
2.simplec Test/simpleproject/project.properties

What is the expected output? What do you see instead?
---After command 'newsimpleproject com.mydomain.test.Test'---
C:\Documents and Settings\Jason\androidapps>newsimpleproject
com.mydomain.test.Test

C:\Documents and Settings\Jason\androidapps>java -classpath
C:\simple1.1.1\SimpleCompiler.jar
com.google.devtools.simple.tools.ProjectCreator com.mydomain.test.Test
---end---
---after command 'simplec Test/simpleproject/project.properties'---
C:\Documents and Settings\Jason\androidapps>simplec
Test/simpleproject/project.p
roperties

C:\Documents and Settings\Jason\androidapps>java -classpath
C:\androidsdk\tools\
lib\apkbuilder.jar;C:\androidsdk\platforms\android-1.5\tools\lib\dx.jar;C:\andro
idsdk\tools\lib\androidprefs.jar;C:\androidsdk\tools\lib\jarutils.jar;C:\simple1
.1.1\SimpleCompiler.jar com.google.devtools.simple.compiler.Main
Test/simpleproj
ect/project.properties
Exception in thread "main" java.lang.NoClassDefFoundError:
android/view/GestureD
etector$SimpleOnGestureListener
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$000(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at
com.google.devtools.simple.compiler.RuntimeLoader$RuntimeClassLoader.
loadClass(RuntimeLoader.java:102)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at
com.google.devtools.simple.compiler.RuntimeLoader.analyzeClassFile(Ru
ntimeLoader.java:351)
        at
com.google.devtools.simple.compiler.RuntimeLoader.visitClassDirectori
es(RuntimeLoader.java:537)
        at
com.google.devtools.simple.compiler.RuntimeLoader.loadSimpleObjects(R
untimeLoader.java:609)
        at
com.google.devtools.simple.compiler.Compiler.<init>(Compiler.java:544
)
        at
com.google.devtools.simple.compiler.Compiler.compile(Compiler.java:29
6)
        at com.google.devtools.simple.compiler.Main.main(Main.java:45)
Caused by: java.lang.ClassNotFoundException:
android.view.GestureDetector$Simple
OnGestureListener
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at
com.google.devtools.simple.compiler.RuntimeLoader$RuntimeClassLoader.
loadClass(RuntimeLoader.java:104)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
        ... 18 more
C:\Documents and Settings\Jason\androidapps>
---end---

What version of the product are you using? On what operating system?
Windows XP SP3 JDK6 JRE6

Original issue reported on code.google.com by bikc...@gmail.com on 9 Jan 2010 at 11:51

GoogleCodeExporter commented 9 years ago
Did you set ANDROID_HOME variable?

Original comment by nmilose...@gmail.com on 11 Jan 2010 at 7:07

GoogleCodeExporter commented 9 years ago
Hi there ans sorry for my English -hope you will understand something)

I'm on Windows XP for this example.

I've installed my Android SDK in C:\Android\android-sdk\
I've installed Simple n C:\Android\Simple\
The ANDROID_HOME and SIMPLE_HOME environment variables are set ok.

I've noticed that on my own installation : 

in my "C:\Android\android-sdk\platforms" directory here are the dirs : 
 - android-3 (that means : Android SDK Platform 1.5_r3 Revision 3)
 - android-4 (1.6 rev 2)
 - android-6 (2.0.1 rev 1)
 - android-7 (2.1 rev1)

So, I have edited the "simplec.bat" file and set "android-3" instead of 
"android-1.5"
Am I doing wrong ? 

Even like that, i can't make compilation run.

Same errors : 
Exception in thread "main" java.lang.NoClassDefFoundError:
android/view/GestureDetector$SimpleOnGestureListener

Someone can help please ?

Original comment by netgob on 29 Mar 2010 at 12:59

GoogleCodeExporter commented 9 years ago
o.k for you people that are having this problem - i had the same problem and 
tried 
everything - the answer is so simple, go to where it says android-3 folder and 
just 
rename that one folder to android-1.5 and your compiling problem is fixed - 
that worked 
for me and now i can compile...

Original comment by stevenba...@gmail.com on 11 Apr 2010 at 9:21

GoogleCodeExporter commented 9 years ago
same problem win vista x64
java -classpath 
C:\simp\tools\lib\apkbuilder.jar;C:\simp\platforms\android-1.5\tools\lib\dx.jar;
C:\simp\tools\lib\androidprefs.jar;C:\simp\tools\lib\jarutils.jar;C:\simp\simple
compiler.jar com.google.devtools.simple.compiler.Main project.properties

output:
Exception in thread "main" java.lang.NullPointerException
        at com.google.devtools.simple.util.Preconditions.checkNotNull(Preconditi
ons.java:42)
        at com.google.devtools.simple.compiler.Project.<init>(Project.java:134)
        at com.google.devtools.simple.compiler.Project.<init>(Project.java:123)
        at com.google.devtools.simple.compiler.Main.main(Main.java:45)

Original comment by mail.ako...@gmail.com on 3 Jul 2010 at 10:35

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I have the same problem on two different Windows XP machines.  I have JRE on 
one and JDK on the other.  I have copied android-3 to android-1.5, set the 3 
environment variables, etc.  Pull the downloads from the web for each machine 
so I did not move a mistake to the second machine.

Same error on both machines.  Sorry chopped off at 80 characters
---------------------------------------------------------------------
C:\basicandroid>simplec Test/simpleproject/project.properties

C:\basicandroid>java -classpath c:\android\android-sdk-windows\tools\lib\apkbuil
der.jar;c:\android\android-sdk-windows\platforms\android-1.5\tools\lib\dx.jar;c:
\android\android-sdk-windows\tools\lib\androidprefs.jar;c:\android\android-sdk-w
indows\tools\lib\jarutils.jar;c:\basicandroid\SimpleCompiler.jar com.google.devt
ools.simple.compiler.Main Test/simpleproject/project.properties
Exception in thread "main" java.lang.NoClassDefFoundError: android/hardware/Sens
orEventListener
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClassCond(Unknown Source)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$000(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at com.google.devtools.simple.compiler.RuntimeLoader$RuntimeClassLoader.
loadClass(RuntimeLoader.java:102)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at com.google.devtools.simple.compiler.RuntimeLoader.analyzeClassFile(Ru
ntimeLoader.java:351)
        at com.google.devtools.simple.compiler.RuntimeLoader.visitClassDirectori
es(RuntimeLoader.java:537)
        at com.google.devtools.simple.compiler.RuntimeLoader.loadSimpleObjects(R
untimeLoader.java:609)
        at com.google.devtools.simple.compiler.Compiler.<init>(Compiler.java:544
)
        at com.google.devtools.simple.compiler.Compiler.compile(Compiler.java:29
6)
        at com.google.devtools.simple.compiler.Main.main(Main.java:45)
Caused by: java.lang.ClassNotFoundException: android.hardware.SensorEventListene
r
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at com.google.devtools.simple.compiler.RuntimeLoader$RuntimeClassLoader.
loadClass(RuntimeLoader.java:104)
        ... 18 more

Original comment by mramosph...@gmail.com on 23 Oct 2010 at 12:00

GoogleCodeExporter commented 9 years ago
Same problem on Windows 7.

My environment variable are :
JAVA_HOME=C:\Program Files (x86)\Java\jdk1.6.0_23
ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk-windows
SIMPLE_HOME=C:\Program Files (x86)\Android\Simple-windows-0.1.1

PATH=..;%JAVA_HOME%;%ANDROID_HOME%;%SIMPLE_HOME%

I try to create a new project :

>newsimpleproject com.mydomain.test.Test

And i receive the following error

java -classpath C:\Program Files (x86)\Android\Simple-
windows-0.1.1\SimpleCompiler.jar com.google.devtools.simple.tools.ProjectCreator
 com.mydomain.test.Test
Exception in thread "main" java.lang.NoClassDefFoundError: Files
Caused by: java.lang.ClassNotFoundException: Files
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: Files.  Program will exit.

whats wrong ?

Original comment by owen.clay@gmail.com on 14 Feb 2011 at 10:00

GoogleCodeExporter commented 9 years ago
Simple only works out-of-the-box with older Android sdk versions.

Download "http://dl.google.com/android/archives/android-sdk-windows-1.6_r1.zip" 
and unzip to disk. It can co-exist with the latest sdk when saved to a 
different directory.
Set the ANDROID_HOME env variable to the location of this 1.6 sdk directory.
Use the Simple bat files to compile.

Renaming platform-3 to platform-1.5 in the latest sdk (r09) does not work as 
some jar files are missing.

Original comment by pge.pg...@gmail.com on 17 Feb 2011 at 7:04