I have a LibraryProject that uses Amazon AWS with ProductionApps that use the LibraryProject (as a library).
My new ProductionApp uses GoogleAppEngine with autogenerates libraries for use in the app. The problem is when I try to build the new app, I get the following error:
Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lorg/codehaus/jackson/Base64Variant;
Through trial and error I found that the offending library (in LibraryProject) is is amazon-aws-sdk-1.6.0-core.jar (required to use Amazon AWS).
How can I resolve the error and still use AWS and GAE?
From your log it looks like the problem is that both Amazon AWS and GoogleAppEngine each include the same class in their library, so assuming that the offending classes are largely identical in Amazon & Google code, possible solutions are:
A. delete those classes from GAE lib, as your main project would still have access to the version provided by Amazon AWS, or
B. extract those classes into its own jar and delete them from both versions, or
C. if the related GAE libs are auto-generated by Eclipse plugin, extract them from GAE into its own jar (but don't delete them from GAE lib), and have Amazon AWS lib project reference the extracted jar (but don't export it)
Try deleting android-support-v4.jar file. I believe Amazon or Google will take care of it. If that doesn't work let me know so I can figure.
Related
I've just followed exactly what was said in this tutorial and ran the command
/usr/local/google_appengine/endpointscfg.py get_client_lib java -bs gradle helloworld_api.NewsApi
I know my NewsApi service works, I've tested it on the Google APIs explorer.
I get a success message: API client library written to ./getNews-v1.zip
I extracted the zip and found the following files inside the folder (getNews):
No JAR file exists!! What do I use to set up the library in my Android client?
Any ideas? Thanks!
If you want a sources JAR and included dependencies to include in your project use '-bs default' or simply omit that option. Using '-bs gradle' or '-bs maven' assumes you are going to use one of those build tools to build a classes JAR yourself. The 'endpointscfg.py' of course won't compile sources to class files for you as it doesn't have knowledge of any Java environment.
More info in the docs:
https://cloud.google.com/appengine/docs/python/endpoints/endpoints_tool
I am integrating Parse sdk to my project.
I have Facebook sdk already in my project.
After i imported the parse .jars and run my project, eclipse has the following error message in Console tab (instead of LogCat tab):
Unable to execute dex: Multiple dex files define Lbolts/AggregateException;
Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lbolts/AggregateException;
I have created a fresh new project and import the 2 sdk, same errors come out.
When I take out one of them, problem gone.
Parse sdk also supports some (if I am not wrong) Facebook functions like Facebook login. But I also need Facebook sharing and I cannot find parse sdk supporting it. So I still need the native Facebook sdk.
Anyone also have the same problem? Any solution for it?...
Great thanks in advance
I figured out that if I only imported the "parse.jar" and leave the "bolts.jar" not imported, everything works fine and I did receive push notification after completing the remaining procedures from Parse website.
It also works for iOS side. Simply import Parse framework and left Bolts framework not imported.
I wonder if this is the best solution but at least it works for me
I use eclipse and I didn't see the imports..
Besucally you need to understand that the problem is that somewhere somehow there are duplicates jar file.
Usually this caused because multipul libraries that you use that have same jars files.
For me - both facebookSDk and the ParseLoginUI had bolts jar. because the ParseLoginUI uses facebookSDK library, Ieft the file only in the facebookSDK library
I am creating a backend GAE project with Cloud Endpoints. I want also to create an Android application that will consume these endpoints, and I found in the documentation here that I have to copy the java source classes to my Android project to access to the endpoints. I really don't like this approach thinking in the case that I am developing the endpoints for a external client (I don't want to give them my source code, I prefer just give them a jar library to avoid complexity).
I found reading the README file also generated with the endpoints that The generated service-specific library can be found in the top level directory
of the zip file:
google-api-services-noteendpoint-v1-rev20130920182043-1.16.0-rc.jar. But this jar is not generated anymore.
So, copying the source classes is the only way to pass the access to the endpoint to the Android project? Where is this jar that once was supposed to be created?
Thanks so much.
Ok, I found the answer, the jar is not generated but can be generated by maven. The endpoints created has maven structure and you only have to package it to get the final jar. Tested and working.
On eclipse, with Google plugin, clicking on the appengine project you can select:
Google->Generate Cloud Endpoint Client Library, you need to have an associated android project. You can create a android associated project, selecting, when creating a new project: AppEngine Connected Android Project.
I would like to integrate my app with a variety of file storage services. I followed the quickstart instructions for the Drive sdk, which adds a bunch of jars to my projects libs directory. Additionally, the Dropbox sdk requires the following list of jars:
commons-logging-1.1.1.jar
dropbox-android-sdk-1.5.3.jar
httpclient-4.0.3.jar
httpcore-4.0.1.jar
httpmime-4.0.3.jar
json-simple-1.1.jar
Once all of these are added to my project, I get the following error when I try to run:
Dex Loader] Unable to execute dex: Multiple dex files define
Lorg/apache/http/entity/mime/FormBodyPart;
If I remove the httpmime jar added for Dropbox, my project runs fine. But is this a safe way to resolve the conflict? Is there an alternative method with which I can build my project and include all the required jars?
Assuming no version conflicts this would work fine. Compare the httpmime-4.0.3.jar to the httpmime jar that Drive added to your libs directory. If they're the same, then it's fine. If they're different, then you'll have to find out the differences between the two and insure that they're not breaking changes. As a last resort you could also repackage one of the SDKs with its required version of httpmime in a jar selectively obfuscated with ProGuard, though that's a hassle.
If you are developing with Eclipse, consider using Google Plugin for Eclipse. It provides a way to add any of the Google's SDK to your app. All the jars are added automatically.
In order to integate my app with GDrive I have followed the tutorial on https://developers.google.com/drive/quickstart-android
In step 3 of the tutorial, the tutorial recommends to install the Google Eclipse plugin to take care of the library setup (this plugin let's you choose which's Google API's to use and creates the /libs folder including the jars for you).
The tutorial shows how to take a picture and upload it to Google Drive.
After working through the tutorial I decided to extend the example: since my app works with Google Spreadsheets I added the spreadsheets API (using the Google Eclipse Plugin) to the example.
The application compiles but on run-time I do get the following error:
Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Ljavax/annotation/CheckForNull;
My feeling is that some libraries are conflicting, but these libraries are all calculated using the Google Eclipse plugin? How is this possible and how should I resolve this issue?
My (generatd) libs folder looks like this (contains the Google Drive API v2 and Spreadsheets API):
gdata-client-1.0.jar
gdata-spreadsheet-3.0.jar
gdata-spreadsheet-meta-3.0.jar
google-api-client-1.12.0-beta.jar
google-api-client-android-1.12.0-beta.jar
google-api-services-drive-v2-rev55-1.12.0-beta.jar
google-collect-1.0-rc1.jar
google-http-client-1.12.0-beta.jar
google-http-client-android-1.12.0-beta.jar
google-http-client-gson-1.12.0-beta.jar
google-http-client-jackson-1.12.0-beta.jar
google-http-client-jackson2-1.12.0-beta.jar
google-oauth-client-1.12.0-beta.jar
gson-2.1.jar
guava-jdk5-13.0.jar
jackson-core-2.0.5.jar
jackson-core-asl-1.9.9.jar
jsr305-1.3.9.jar
jsr305.jar
Thanks for any help,
Peter
I had the same problem. Removing the jsr305.jar from the libs folder solved the problem for me.
Remove the bin and gen folders and Build the project
or
check multiple private libraries added to your project
or
check whether the multiple play services added to your project