Thanks for the message. See responses inline below...
Are you by any chance using Proguard? If so, make sure to add the following to your proguard.cfg:
-keep class android.support.v4.app.** { *; }
-keep interface android.support.v4.app.** { *; }
Also, add "!code/allocation/variable" to the "-optimizations" line (if you have one).
It would suggest that android-support-v4.jar and android-support-v4-r3-googlemaps.jar are conflicting but I cannot be sure about this.
android-support-v4-r3-googlemaps.jar is meant to replace android-support-v4.jar. Make sure only one is in the build path of your project (or neither if you add the library project to your project's build path). I recommend using the jar. There's not much reason to use it as a library project unless you have some customizations / bug fixes you want to make to the original compatibility library source.
I then attempted to then build the project in eclipse and try to use
it directly , first by using the project directly , secondly by
importing it from the ant build.xml. I could not successfully get this
to compile without errors pertaining to FragmentTransaction.detach(),
FragmentTransaction.attach(), Fragment.isDetached() . I saw that this
was answered previously with an issue between r2 and r3 but as far as
I am aware I am using the latest versions of everything and nothing is
out of date. I just can't get it to build for the life of me.
It turns out I completely forgot to update the Eclipse project's build path for the r3 release (the ACL r3 release added a bunch of new source folders). I just pushed a fix:
If you "git pull" you should have it locally.
Specifically with regard to FragmentTransaction.attach(), FragmentTransaction.detach() and Fragment.isDetached(), I'm not 100% sure what the issue is. I know they were added in API level 13 *and* r3 of the ACL. The thing is r3 of the ACL has those methods without requiring API level 13.
Can you double-check to make sure all your imports use the compatibility library (i.e. imports of Fragment, FragmentActivity, etc use the android.support.v4 packages)?
I cannot build the .jar myself successfully nor can I find any steps that
explain what I need to do this correctly so it's a little bit "voodoo
magic" for me as to how you've achieved that. Although I'm not sure if
it would help my initial fault I can't build it to see if it would
( nor can I use it as a base to build the source from the AVD supplied
package ).
Its easiest to do it from the command line (and required Ant 1.8.1 or higher):
cd android-support-v4-googlemaps
ant clean-build
That'll build the jar and put it in the build/jar directory.
I'm using Eclipse 3.70 and I've pulled the required libraries from
AVD. My target android VM is 2.2 ( api level 8 ) and my initial
fragment test application works fine on that VM ( as well as api 11 &
api 13 ). However as soon as I swap to using the map enabled .jar i
get the first error described above. The
Definitely make sure you only have android-support-v4-r3-googlemaps.jar in your build path (and not android-support-v4.jar). Also, make sure not to put any android.jar or maps.jar in your build path. Instead let the ADK add them for you by setting the API level (since you're using API Level 8, use "Google APIs" level 8).
At this stage I can't get the .jar or the project to work. Any help
you can through my way would be greatly appreciated as I desperately
need to use this mechanism to achieve the solution I require.
Thanks for taking the time to read all that , really hope you can
help.
I really hope something above helps. Its hard to say without seeing your setup. Let me know if any of it helps and I'll add some updated instructions to the README to help others out in the future. Or if it doesn't. :-)
Thanks,
Pete Doyle