Including 3rd party jars in Android App

by sundancebleu » Wed, 28 Oct 2009 16:44:42 GMT


Sponsored Links
 I'm hoping someone can help, when I try including a custom jar file I
built in another java project through eclipse (in my build path), I
get a "could not find method" error when I try to run.  When I put a
"uses-library" in the manifest.xml, I get an
"INSTALL_FAILED_MISSING_SHARED_LIBRARY" error when the app tries to
install on the emulator.  Do I need to build the library as part of my
AVD?  if so, how do I do that?  Thanks in advance.

--~--~---------~--~----~------------~-------~--~----~



Including 3rd party jars in Android App

by Xavier Ducrohet » Thu, 29 Oct 2009 01:18:38 GMT


 uses-library is for shared library which you cannot add yourself.

You should simply have to put the jar file in your project folder and,
from Eclipse, do a right click on it from the Package Explorer and
choose "Add to build path"

Xav






-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.

Please do not send me questions directly. Thanks!

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Including 3rd party jars in Android App

by Ian Guedes Maia » Thu, 29 Oct 2009 14:41:22 GMT


 Put your .jar on <PROJECT>/libs. This folder is recognized by eclipse
and will be included on the APK.

2009/10/27 sundancebleu <sundanceb...@gmail.com>:

--~--~---------~--~----~------------~-------~--~----~



Including 3rd party jars in Android App

by sundancebleu » Thu, 29 Oct 2009 14:44:32 GMT


 Thanks for the reply.  I actually tried that, but it still doesn't
work.  I get the following error (not sure if this helps):

10-29 03:48:46.469: WARN/dalvikvm(721): Unable to resolve superclass
of Lcom/roger/framework/util/StringUtils; (480)
10-29 03:48:46.469: WARN/dalvikvm(721): Link of class 'Lcom/roger/
framework/util/StringUtils;' failed
10-29 03:48:46.469: ERROR/dalvikvm(721): Could not find method
com.roger.framework.util.StringUtils.indexOfIgnoreCase, referenced
from method com.roger.location.AgentAddressHelper.parseResults
10-29 03:48:46.469: WARN/dalvikvm(721): VFY: unable to resolve static
method 1868: Lcom/roger/framework/util/StringUtils;.indexOfIgnoreCase
(Ljava/lang/String;Ljava/lang/String;)I


I also seem to be getting a VerifyError

Any ideas?  Thanks,

- Roger






--~--~---------~--~----~------------~-------~--~----~



Including 3rd party jars in Android App

by Xavier Ducrohet » Fri, 30 Oct 2009 02:08:30 GMT


 Are you sure that your jar file doesn't depend on another jar file?

Xav








-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.

Please do not send me questions directly. Thanks!

--~--~---------~--~----~------------~-------~--~----~



Including 3rd party jars in Android App

by sundancebleu » Fri, 30 Oct 2009 13:01:15 GMT


 Ok, I feel like an idiot.  The jar file I was including was built by
someone else and I was assuming it wasn't dependent on any other
jars.  It turns out it was, so that was the issue.  I just jumped to
the worst case scenario instead of considering the simplest.  Thanks
for all that help everyone.

- Roger









--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. ACTION_CALL works without permission

Hi all,
I'm makeing some test about Android permission with a very simple
application. I'm launching this Intent

        Uri callUri = Uri.parse("tel://12345678");
        Intent callIntent = new Intent(Intent.ACTION_CALL,callUri);
        callIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        startActivity(callIntent);

and using this configuration file

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      android:versionCode="1"
      android:versionName="1.0.0"
package="it.libroandroid.cap03.call">
    <application android:icon="@drawable/icon" android:label="@string/
app_name">
        <activity android:name=".CallActivity"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category
android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>

without any permission.

The problem is the phone dial the number but I didn't set any
permission. I know something has changed in last release but.....

Where's the trouble?

Thankx
Max


--~--~---------~--~----~------------~-------~--~----~

2. return to activity once call has ended

I am currently calling the dialer from within my activity using the
following code

Intent intent = new Intent(Intent.ACTION_CALL);
intent.setData(Uri.withAppendedPath(Phones.CONTENT_URI, contactId));
startActivity(intent);

is it possible to return to my activity once the call has ended?

--~--~---------~--~----~------------~-------~--~----~

3. Emit a signal

4. Does Android Browser support "right menu - open with" ?

5. Export to sim somewhat working...

6. OpenMax-Bellagio integration in opencore

7. How to re-install & sign android built-in applications