[android-developers] Re: Android maven plugin: Adding android support jar to test project ~ Cannot load class 'android.support.v4.os.ParcelableCompatCreatorHoneycombMR2'

2012-08-29 Thread blizzard
The purpose of Maven ?

Configuration controle ... release management ... reporting  the list 
goes on and on.
However, the problem I experience above occurs on both maven and ant builds.

On Tuesday, August 28, 2012 11:31:27 AM UTC+2, Jason Sesso wrote:

 I'm trying to understand mavens purpose

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: java.lang.ClassNotFoundException: android.support.v4.os.ParcelableCompatCreatorHoneycombMR2 in test project

2012-08-29 Thread blizzard
I've experienced the same problem while attempting a test cycle.
My original post is here: 
https://groups.google.com/forum/?fromgroups=#!searchin/android-developers/android$20support$20jar/android-developers/sotIalKQTUQ/2x-O9BczHjgJ

I've determined that the support jar is correctly included to the APK, 
and is also available on the class-path of the test APK.
However, a problem appears whenever an instrumentation test is attempted 
against a FragmentActivity.
In my case, that's GDActivity to be specific (a greendroid library).

I've downloaded the git source code, and i'm busy investigating why the 
Instrumentation test initialization fails.
So far, I think it might be that the test runner isn't using the correct 
class loader ... but il have to do a further check on that one.

-Michael

On Sunday, August 26, 2012 8:06:21 PM UTC+2, nikhilesh wrote:

 Hi Group,

 I created a project using the support.v4 library. Now I am creating a *test 
 project* for my main app. But when I try to run it gives me the exception 
 *W/ClassPathPackageInfoSource(551): Caused by: 
 java.lang.ClassNotFoundException: 
 android.support.v4.os.ParcelableCompatCreatorHoneycombMR2 in loader 
 dalvik.system.PathClassLoader*.

 I searched a lot but not able to find anything on it.

 Please help.

 Thanks


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Android maven plugin: Adding android support jar to test project ~ Cannot load class 'android.support.v4.os.ParcelableCompatCreatorHoneycombMR2'

2012-08-28 Thread blizzard
I've had a major breakthrough on this.
I'm posting my progress here 
http://stackoverflow.com/questions/12087948/test-apk-does-not-resolve-load-classes-from-main-apk-cannot-load-class-andr

My conclusion thus far is that android instrumentation tests do not support 
FragmentActivity or other activity wrappers at this point in time.

-Michael

On Thursday, August 23, 2012 10:56:18 AM UTC+2, blizzard wrote:

 Hello everyone,

 I'm having trouble executing instrumentation tests using the android maven 
 plugin. I have followed the libraryprojects example to the last detail, 
 however, there is one slight difference in my setup ~ i'm adding the 
 android support jar as an external dependency.

 My setup looks as follows:

 APK lib project (greendroid to be specific)

 dependency
   groupIdcom.google.android/groupId
   artifactIdsupport-v4/artifactId
   versionr6/version
 /dependency

 dependency
 groupIdcom.google.android/groupId
 artifactIdandroid/artifactId
 scopeprovided/scope
 /dependency

 dependency
 groupIdjunit/groupId
 artifactIdjunit/artifactId
 scopetest/scope
 /dependency
 APK project

 dependency
 groupIdcom.google.android/groupId
 artifactIdandroid/artifactId
 scopeprovided/scope
 /dependency
 dependency
 groupIdgreendroid/groupId
 artifactIdGreenDroidFragment/artifactId
 version1.0.0-SNAPSHOT/version   
 typeapklib/type 
 /dependency
 APK test project (and here's the problem  )

 dependency
   groupIdcom.google.android/groupId
   artifactIdsupport-v4/artifactId
   versionr6/version
 /dependency   
 dependency
 groupIdcom.google.android/groupId
 artifactIdandroid/artifactId
 scopeprovided/scope
 /dependency
 dependency
 groupIdcom.google.android/groupId
 artifactIdandroid-test/artifactId
 scopeprovided/scope
 /dependency

 dependency
 groupIdcom.jayway.android.robotium/groupId
 artifactIdrobotium-solo/artifactId
 version3.2.1/version
 /dependency

 dependency
 groupIdcom.entersectmobile/groupId
 artifactIdNMACFragment/artifactId
 version1.0.0-SNAPSHOT/version
 typeapk/type
 scopeprovided/scope
 /dependency

 dependency
 groupIdcom.entersectmobile/groupId
 artifactIdNMACFragment/artifactId
 version1.0.0-SNAPSHOT/version
 typejar/type
 scopeprovided/scope
 /dependency  
 The problem is that delvik is unable to find or link support jar upon 
 running instrumentation tests.

 By packaging the android support jar as part of the APK test project, 
 delvik complains that it's unable to resolve the compiled code. This is 
 because the dex output of the main APK is different from the dex output of 
 the test APK.

 W/dalvikvm(328): Class resolved by unexpected DEX:  
 Lcom/entersectmobile/android/nedbank/GenerateOtpFragment;(0x44edffb0):0x121de0
  
 ref   
 [Landroid/support/v4/app/Fragment;] 
 Landroid/support/v4/app/Fragment;(0x44edffb0)
 By not packaging the android support as part of the APK test project, 
 delvik is unable to locate the compiled code. This happens when making the 
 scope provided or excluding the dependency completely.

 W/ClassPathPackageInfoSource(632): Cannot load class. Make sure it is in 
 your apk.
 Class name: 'android.support.v4.os.ParcelableCompatCreatorHoneycombMR2'. 
 Message: android.support.v4.os.ParcelableCompatCreatorHoneycombMR2
 The only thing I can think of is to somehow manually tell the APK test 
 project to resolve the android-support dependency from the main APK project 
 using a delvik linking mechanism.

 Any ideas would be much appreciated, 
 Thanks
 -Michael



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Android maven plugin: Adding android support jar to test project ~ Cannot load class 'android.support.v4.os.ParcelableCompatCreatorHoneycombMR2'

2012-08-24 Thread blizzard
Hello everyone,

I'm having trouble executing instrumentation tests using the android maven 
plugin. I have followed the libraryprojects example to the last detail, 
however, there is one slight difference in my setup ~ i'm adding the android 
support jar as an external dependency.

My setup looks as follows:

APK lib project (greendroid to be specific)

dependency
  groupIdcom.google.android/groupId
  artifactIdsupport-v4/artifactId
  versionr6/version
/dependency

dependency
groupIdcom.google.android/groupId
artifactIdandroid/artifactId
scopeprovided/scope
/dependency

dependency
groupIdjunit/groupId
artifactIdjunit/artifactId
scopetest/scope
/dependency
APK project

dependency
groupIdcom.google.android/groupId
artifactIdandroid/artifactId
scopeprovided/scope
/dependency
dependency
groupIdgreendroid/groupId
artifactIdGreenDroidFragment/artifactId
version1.0.0-SNAPSHOT/version   
typeapklib/type 
/dependency
APK test project (and here's the problem  )

dependency
  groupIdcom.google.android/groupId
  artifactIdsupport-v4/artifactId
  versionr6/version
/dependency   
dependency
groupIdcom.google.android/groupId
artifactIdandroid/artifactId
scopeprovided/scope
/dependency
dependency
groupIdcom.google.android/groupId
artifactIdandroid-test/artifactId
scopeprovided/scope
/dependency

dependency
groupIdcom.jayway.android.robotium/groupId
artifactIdrobotium-solo/artifactId
version3.2.1/version
/dependency

dependency
groupIdcom.entersectmobile/groupId
artifactIdNMACFragment/artifactId
version1.0.0-SNAPSHOT/version
typeapk/type
scopeprovided/scope
/dependency

dependency
groupIdcom.entersectmobile/groupId
artifactIdNMACFragment/artifactId
version1.0.0-SNAPSHOT/version
typejar/type
scopeprovided/scope
/dependency  
The problem is that delvik is unable to find or link support jar upon running 
instrumentation tests.

By packaging the android support jar as part of the APK test project, delvik 
complains that it's unable to resolve the compiled code. This is because the 
dex output of the main APK is different from the dex output of the test APK.

W/dalvikvm(328): Class resolved by unexpected DEX:  
Lcom/entersectmobile/android/nedbank/GenerateOtpFragment;(0x44edffb0):0x121de0 
ref   
[Landroid/support/v4/app/Fragment;] 
Landroid/support/v4/app/Fragment;(0x44edffb0)
By not packaging the android support as part of the APK test project, delvik is 
unable to locate the compiled code. This happens when making the scope provided 
or excluding the dependency completely.

W/ClassPathPackageInfoSource(632): Cannot load class. Make sure it is in your 
apk.
Class name: 'android.support.v4.os.ParcelableCompatCreatorHoneycombMR2'. 
Message: android.support.v4.os.ParcelableCompatCreatorHoneycombMR2
The only thing I can think of is to somehow manually tell the APK test project 
to resolve the android-support dependency from the main APK project using a 
delvik linking mechanism.

Any ideas would be much appreciated, 
Thanks
-Michael

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en