[android-developers] Re: VerifyException with Android library project

2011-12-09 Thread Bret Foreman
Tre, Your idea number 2 worked. There's a bug of some sort in the SDK. The work-around is to build the main project AND the library without instantiating any library classes in the main project, THEN instantiate the required classes. If you make any library calls before building both of them then

Re: [android-developers] Re: VerifyException with Android library project

2011-12-09 Thread Kristopher Micinski
On Fri, Dec 9, 2011 at 10:41 AM, Bret Foreman bret.fore...@gmail.com wrote: Tre, Your idea number 2 worked. There's a bug of some sort in the SDK. The work-around is to build the main project AND the library without instantiating any library classes in the main project, THEN instantiate the

Re: [android-developers] Re: VerifyException with Android library project

2011-12-09 Thread Kristopher Micinski
P.s., glad you got it working, but still doubtful there's an sdk bug... I should correct, I'm confident that there is *an* sdk bug, I'm just not sure that particular bug is causing this problem :-) kris -- You received this message because you are subscribed to the Google Groups Android

[android-developers] Re: VerifyException with Android library project

2011-12-09 Thread Bret Foreman
kris, You're right, a bug is not an accurate way to describe a hard-to- diagnose failure mode that may be due to a possible platform misconfiguration. Perhaps we should call it job security for Android developers. My main point was to document a possible workaround in the forum in case others

[android-developers] Re: VerifyException with Android library project

2011-12-08 Thread Bret Foreman
Here's an example of what I see in the logcat: 12-08 11:04:01.119: W/dalvikvm(949): VFY: unable to find class referenced in signature (Lcom/pachube/jpachube/Feed;) 12-08 11:04:01.139: E/dalvikvm(949): Could not find class 'com.pachube.jpachube.Data', referenced from method

[android-developers] Re: VerifyException with Android library project

2011-12-08 Thread Bret Foreman
No, the classes are wrappers around a web service. Nothing to do with Android system components. On Dec 8, 2:48 pm, TreKing treking...@gmail.com wrote: On Thu, Dec 8, 2011 at 4:40 PM, Bret Foreman bret.fore...@gmail.com wrote: However, at runtime I'm getting a VerifyException for each of the

Re: [android-developers] Re: VerifyException with Android library project

2011-12-08 Thread TreKing
On Thu, Dec 8, 2011 at 4:54 PM, Bret Foreman bret.fore...@gmail.com wrote: No, the classes are wrappers around a web service. Nothing to do with Android system components. Is there a need for a Library Project then? A standard Java jar should suffice if there's no Android-specific stuff in

[android-developers] Re: VerifyException with Android library project

2011-12-08 Thread Bret Foreman
Yeah, I used the jar version first but it's got some bugs. I got the sources from the developer and built the library so I could help him debug it for Android. There's some weirdness going on with HTTP redirects in his jar. The Java build path in the library looks correct - I see the src and gen

Re: [android-developers] Re: VerifyException with Android library project

2011-12-08 Thread Kostya Vasilyev
Do those classes in the library, by any chance, reference standard Java apis that don't exist in your runtime Android version? That would cause verification to fail for them, perhaps triggering further verification failures up to the activity? 09.12.2011 3:14 пользователь Bret Foreman

[android-developers] Re: VerifyException with Android library project

2011-12-08 Thread Bret Foreman
I guess I could just create a Java project rather than an Android project and then include the external jar in the Android project build. This might make debugging rather tricky, though. I'm not sure the debugger will know where to find the sources. -- You received this message because you are

[android-developers] Re: VerifyException with Android library project

2011-12-08 Thread Bret Foreman
Kostya, That seems possible. The Java code was written without any idea that it would ever run on Android. But how would I tell from the logcat what standard Java API it might be using that is unsupported by Android? So far, I only see the VerifyException for the actual classes I'm trying to

Re: [android-developers] Re: VerifyException with Android library project

2011-12-08 Thread Kristopher Micinski
If the verifier says it can't find the definition of that class, then it literally can't find the definition of that class. So either your build environment is set up wrong, or a jar file has been built wrong. It's not that the verifier can't find a standard java class, it's one of yours

[android-developers] Re: VerifyException with Android library project

2011-12-08 Thread Bret Foreman
kris, Then we're back to the project/library setup. The project builds without errors or warnings, yet fails at runtime. But as far as I know, there are very few steps in setting up and using an Android project and I've gone through the ones described in my OP. I'm looking for ideas of what else

Re: [android-developers] Re: VerifyException with Android library project

2011-12-08 Thread TreKing
On Thu, Dec 8, 2011 at 6:05 PM, Bret Foreman bret.fore...@gmail.com wrote: I'm looking for ideas of what else I might try. Some stuff I'd try. 1 - Add a new class to the library and try to instantiate that, just to verify it also doesn't work. 2 - Start from scratch and do it over again, step