Closed moonandroid closed 9 years ago
Would you please elaborate what's conflicting? Any stacktrace, console logs etc?
When i run my application i got error
java.lang.NoClassDefFoundError: com.google.android.gms.R$styleable at com.google.android.gms.maps.GoogleMapOptions.createFromAttributes(Unknown Source) at com.google.android.gms.maps.SupportMapFragment.onInflate(Unknown Source) at android.support.v4.app.FragmentManagerImpl.onCreateView(FragmentManager.java:2169) at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:300) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:676) at android.view.LayoutInflater.inflate(LayoutInflater.java:466) at android.view.LayoutInflater.inflate(LayoutInflater.java:396) at android.view.LayoutInflater.inflate(LayoutInflater.java:352) at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:270)
But when remove AWS functionality all working well.
My libraries for my app:
1)build.gradle In dependencies { compile fileTree(include: ['.jar'], dir: 'libs') compile 'com.android.support:multidex:1.0.0' compile 'com.android.support:appcompat-v7:22.2.0' compile project(':PullToRefreshListLib') /--For Pull to refresh list_/ compile project(':FacebookSDK') compile 'com.google.android.gms:play-services:7.5.0' compile 'com.espreccino:peppertalk:0.5.9' compile 'com.squareup.picasso:picasso:2.5.2' compile project(':library') /_--For Google Map with clustering ,downloaded from https://github.com/googlemaps/android-maps-utils/archive/master.zip/ }
2)libs folder contains -----------For AWS we are using-------- aws-android-sdk-core-2.2.1
android-async-http-1.4.4 demo easyandroidanimationslibrary-v0.5 gcm gdata-client-1.0 gdata-contacts-3.0 gdata-core-1.0 guava-11.0.2 httpclient-4.0.1 signpost-commonshttp4-1.2.1.1 twitter4j-core-4.0.2 twitter4j-media-support-3.0.3 universal-image-loader-1.9.4-SNAPSHOT YouTubeAndroidPlayerApi
The SDK has its own namespace com.amazonaws
. I don't expect it collide with other 3rd party libraries. It's more like an issue with Google Map library. You may be able to find some clue from StackOverflow, for example http://stackoverflow.com/questions/15760834/android-java-lang-noclassdeffounderror-com-google-android-gms-rstyleable.
But when we remove aws lib then all working well.
The SDK supports Android level 10+. We've tested it on different devices, Google or non Google, running different Android levels, and haven't seen the described issue. A few things you can try:
compile 'com.amazonaws:aws-android-sdk-s3:2.2.2'
Hi, i have discussed with aws support team and they told me the description you've given me it sounds very much like you should be using the aws-android-sdk-2.2.1-core-no-third-party.jar file rather than the full aws-android-sdk-2.2.1-core.jar file. See here: https://mobile.awsblog.com/post/Tx3JXN6FGS5Y2L1/Understanding-the-JARs-in-the-AWS-SDK-for-Android The no-third-party JAR is specifically designed when you need to link to other dependencies.
But from where i can get aws-android-sdk-2.2.1-core-no-third-party.jar file ? Can you please help me
We decided to drop no third party jar since v2.1.2 (see release notes). You don't need no third party jar any more. As I explained before, all third party libraries, currently only gson-2.2.4 and commons-logging-1.1.1, are re-packaged into the core jar under com.amazonaws
namespace by JarJar. I see no reason it will conflict with other 3rd party libraries.
I notice your app has a long list of libraries and you use multi-dex to by pass the 64k method count limit issue. It can cause NoClassDefFoundError if not configured properly. Would you please double check your build.gradle file? Here are several useful links:
we already using multidex within our project. Can you please give from where i can get aws-android-sdk-2.2.1-core-no-third-party.jar ?
There is no aws-android-sdk-2.2.1-core-no-third-party.jar. We've dropped aws-android-sdk-x.x.x-core-no-third-party.jar since v2.1.2. Anyway, I am not sure how it will solve this matter.
ok. Thanks. But for my issue AWS support team suggested me for this jar. :(
Sometimes knowledge is out of sync across teams :(. If you have contacted the support team, would you please ask them to route it to mobile SDK team? And, please attach build.gradle if possible. Thanks.
ok.
I assume you've contacted customer support. I'll close this issue, but feel free to reopen it if the issue isn't resolved.
My app have some google functionality like GCM,Google +,Google map with clustering. Before implementing aws my app working well in all devices. But after implementing aws my app stop working in non-google devices means app only work in Nexus device. I tried lots but not found any solution. But We have checked more and founded that there are some issue with aws-android-sdk-core-2.2.1 because this file contain some google classes so it may be conflict with other google classes.
Any one have idea why this issue comes ?