android build path conflict? - android

i try to embed the java file for ebay sharing with supported jar files, and i also have the jar file of ksoap2 for xml parsing.
The following error is shown in package,i don`t know how to recover it.

After implementing JRE system library the problem is resolved.

Related

Android studio create .jar file instead of .aar file

Hi I followed android documentation to create a library. But my problem is whenever I run the project means it is creating .aar file. I google it and found How to convert AAR to JAR
this. I'm using iZip Unarchiver. But it is not extracting the .aar file.
But they accepted that answer. Can any one know how to extract .jar from .aar. Thank you.
You can directly generate jar file using android studio. Here is a good tutorial for this.

The file does not exist for the external tool named SWIG

I am trying to build an application using Android NDK. I have followed all the steps and everything works fine and the .so file is being made. But in eclipse when I try to clean the project I get the following error:
The file does not exist for the external tool named SWIG.
Does anyone have any idea what this might be?
Check Project->Properties->Builders, probably you have an external builder that is not working.

Android ADT 21 NoClassDefFoundError

I am using Salesforce SOAP API to do a simple login and logout program. I follow the sample code at http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_login.htm.
This code works fine on desktop.
Then, I port it to Android application with the generated jar file (it is sforce-client.jar) based on my WSDL file and the wsc.jar.
However, when I run it, I got the following error,
Could not find class 'com.sforce.soap.enterprise.EnterpriseConnection'
referenced from method salesforceAccess.SalesforceAccess.login
Do you have any idea what cause it and how to solve it?
Thank you so much for the help.
Ada
Did you add the jar file to the 'libs' directory and check the "Order and Export" checkbox under the properties?
If you followed the default instructions for building your jar from the WSDL, then you need to add both this generated jar, and the wsc.jar that you used to generate the jar to your android libs folder. From the error it sounds like you're missing the wsc.jar that you used to generate your jar from.
Alternatively you can set -Dstandalone-jar=true as an option when you generate your jar, and then everything will be in that one generated jar.
Finally, I solved the problem!
The steps are,
1. Build the correct wsc-xxx.jar file from github.com/forcedotcom/wsc (Thank you, Superfell!)
2. Generate the jar file from wsdl using the above wsc-xxx.jar. NOTE: using jdk1.6 to generate the target 1.6 jar. (or whatever match the Android SDK level!!)
3. Import the jars into the Android project.
I was stuck because I was using jdk1.7 to generate the jar file. However, like what this thread (Android emulator crash: "Dx bad class file magic" / ClassNotFoundException on startup?) said, the Android SDK level is 1.6 (I tried to change to 1.7, the project won't be able to compiled). Therefore, the generated jar file from wsdl won't be able to be packaged in!
The eclipse and ADT doesn't give me any warning or error to tell me. I have to build the Android project from command line (see http://randomsamples.info/blog/phil/android-adt-2101-javalangnoclassdeffounderror-rdimen) and noticed the warning,
[dx] trouble processing:
[dx] bad class file magic (cafebabe) or version (0033.0000)
[dx] ...while parsing com/sforce/soap/enterprise/EnterpriseConnection.cla
ss
[dx] ...while processing com/sforce/soap/enterprise/EnterpriseConnection. class
What a process!!

Error in creating a pdf file android

I am new to Android programming,my task was to create a pdf file in adroid
First I created a Java project using Eclipse (projectA) , wrote code in java to generate a pdf file using itext (Added jars to the project) and its working fine.
Now I created another Android project (ProjectB) , and added the itext jars (similar to projectA) and code, but it is not working properly
Error : Error generating final archive: Found duplicate file for APK: com/itextpdf/text/LICENSE.txt
Origin 1: /home/SudheerB/workspace-Ecclipse/NeedAnalyserTool13/libs/itextpdf-5.3.3-sources.jar
Origin 2: /home/SudheerB/workspace-Ecclipse/NeedAnalyserTool13/libs/itext-xtra-5.3.3-sources.jar
Can someone help me on this?
It is very simple. You are using jar files which have some common classes. so during the generation of apk file, duplicates files are being found.
just use one of the jar files. either "itextpdf.jar" or "itextpdf-xtra.jar". your problem will be solved.
Remove the sources jars from your project and at least that error should go away.
Seems like you're using the jars that are available for Java instead of the Android/GAE port. Please switch to using the official port for Android and Google App Engine. That will solve your problem. This port isn't available from SourceForge, you need to fill out the form at http://itextpdf.com/sales/ and they'll send you a link where you can download it.

Ksoap2 for Android

I'm using Ksoap2 on Android for connecting Webservice. When I add file Ksoap2.jar downloaded from this site:
All of versions that i get cannot use. The detail of error is: "Archive for required library: 'C:/Users/xxx/workspace/ksoap2-android-2.6.1.jar' in project 'yyy' cannot be read or is not a valid ZIP file"
help me, plz!
See this http://forums.spout.org/threads/eclipse-error-cannot-be-read-or-is-not-a-valid-zip-file.1233/
I think your zip file may be corrupted or did not get downloaded complete....

Categories

Resources