[android-developers] Having a Problem using a Library in My Project

2012-03-02 Thread Mark Phillips
I have an Android project, which is a library. The project compiles and
works in an example project. However, the example project has the same
package name (but a separate project).

In my current project, which has a completely different package name, I am
trying to use the same library. I set up the current project as follows:
* the library project is in the eclipse build path as a project
* the manifest.xml file has this inside the application tag -
  uses-library
android:name=com.markupartist.android.widget.ActionBar
  android:required=true /
* I added these lines to the layout file for my activity:
com.markupartist.android.widget.ActionBar
android:id=@+id/actionbar
style=@style/ActionBar
/
I get the error in eclipse - error: Error: No resource found that matches
the given name (at 'style' with value '@style/ActionBar').

The ActionBar library has a syle.xml file with the ActionBar tag. I also
tried putting the ActionBar library as a jar in the build path, and I get
the same error.

What am I missing to include the ActionBar library in my current project?

Thanks,

Mark

-- 
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

Re: [android-developers] Having a Problem using a Library in My Project

2012-03-02 Thread Mark Murphy
On Fri, Mar 2, 2012 at 5:30 PM, Mark Phillips
m...@phillipsmarketing.biz wrote:
 I have an Android project, which is a library.

Is this a true Android library project
(http://developer.android.com/guide/developing/projects/projects-eclipse.html#SettingUpLibraryProject)?

 * the library project is in the eclipse build path as a project

Yes, but did you add it to Eclipse as an Android library project
(http://developer.android.com/guide/developing/projects/projects-eclipse.html#ReferencingLibraryProject)?

 * the manifest.xml file has this inside the application tag -
           uses-library
 android:name=com.markupartist.android.widget.ActionBar
               android:required=true /

Delete this, unless your library is really a firmware add-on that
you have built into custom firmware (in which case, you're outside the
scope of this list).

 I also
 tried putting the ActionBar library as a jar in the build path, and I get
 the same error.

JARs don't have resources.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
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


Re: [android-developers] Having a Problem using a Library in My Project

2012-03-02 Thread Mark Phillips
On Fri, Mar 2, 2012 at 3:36 PM, Mark Murphy mmur...@commonsware.com wrote:

 On Fri, Mar 2, 2012 at 5:30 PM, Mark Phillips
 m...@phillipsmarketing.biz wrote:
  I have an Android project, which is a library.

 Is this a true Android library project
 (
 http://developer.android.com/guide/developing/projects/projects-eclipse.html#SettingUpLibraryProject
 )?

 Yes.

   * the library project is in the eclipse build path as a project

 Yes, but did you add it to Eclipse as an Android library project
 (
 http://developer.android.com/guide/developing/projects/projects-eclipse.html#ReferencingLibraryProject
 )?


Nope, this was my problem. Thanks for the information!!


  * the manifest.xml file has this inside the application tag -
uses-library
  android:name=com.markupartist.android.widget.ActionBar
android:required=true /

 Delete this, unless your library is really a firmware add-on that
 you have built into custom firmware (in which case, you're outside the
 scope of this list).


I was looking at the manifest docs and found library, and not a lot of
clear explanation, so I tried it.


  I also
  tried putting the ActionBar library as a jar in the build path, and I get
  the same error.

 JARs don't have resources.


I discovered that by looking in the jar file.

Thanks!!!

Mark

-- 
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