Eclipse + cupcake + referenced projects in build path = VerifyError

by Guillaume Perrot » Tue, 28 Apr 2009 23:03:06 GMT


Sponsored Links
 In the previous SDK releases, we have our application cut into 3
android projects:
* Project REAL (the real android project)
* Project LIB1 (a non executable android project, just to make android
reusable classes)
* Project LIB2 (same as LIB1)
LIB1 and LIB2 are android projects rather than J2SE ones because of
the API they use, indeed LIB1 and LIB2 use Android classes.
Project REAL has LIB1 and LIB2 in its project build path in Eclipse.

In SDK 1.0 and 1.1, no problem at all when running the project REAL
from Eclipse, it mixes the code of the 3 projects and produces one big
APK with everything in it.

But now in SDK 1.5, it installs 3 different APKs on the emulator or on
the phone (I tested both), and the project REAL immediately crashes
because of a VerifyError: it does not found a class that is in LIB1.

The size of the produced APK is smaller, indeed, LIB1 and LIB2 classes
are not in it...
I tried using uses-library in the manifest like google maps library
but it complains at installing, we have a "missing shared library"
error.
I tried adding class folders in build path, it compiles in Eclipse but
we still have VerifyError.
Same thing if we use external class folders in build path.

The only thing that worked for me was to add an eclipse folder, which
is in fact a symbolic link, and to make it a source folder. But that
solution is not convenient for us when because we share the projects
in SVN and so the paths are different. Using eclipse path variables
can do the trick but we waste some time to configure them so it's not
convenient enough.

Is there a way to restore the old behavior on other android projects
in build path ?


--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. calloc probelm in Dalvik

Hi all,

I am learning Dalvik by debugging the code. I found some calloc invocations
in allocateAuxStructures() function return NULL. I cound't trace into the
calloc function, so I don't know if memory really runs out or due to other
reasons.

The following is my building environment:
TARGET_PRODUCT=sim
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=true
TARGET_BUILD_TYPE=release
TARGET_ARCH=x86
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=
TARGET_DEVBUILD=false
TARGET_DALVIK_COMPILER=gcc

Does anyone have clue in this?

Many thanks.

--~--~---------~--~----~------------~-------~--~----~

2. Put WebView and EditText together

While I put the WebView and EditText in the same page, I encounter a
problem.

The EditText will hold the focus and I can't input word into WebView,
so that I can't do login or search in the WebView.

If I take off EditText, the WebView can be edit again and I can do
login and search.

Do anyone know how to handle this situation??

Thank you
--~--~---------~--~----~------------~-------~--~----~

3. How to get source code out of a .apk file

4. Support for Javax.comm

5. Building android core for custom hardware

6. Differentia bussiness contacts and personnel contacts

7. What are those branches other than "master"