Never tried a library in Android, but I've done them in Symbian (C++),
and you always had to manually add the appropriate interface includes
to the search list in the referencing project, in addition to adding
the library. (I don't know what the equivalent might be in Android,
though -- maybe adding the library class directory to the referencing
project's class path?)
On Aug 1, 2:56 pm, "{ Devdroid }" <[email protected]> wrote:
> Hi,
>
> I tried to build test library and test app with latest ADT and
> Eclispe however Eclipse complains
> on each reference I made to library classes from my test app.
> This is what I did:
>
> 1. created Test Library Android project, marked it as "Library"
> (package name "test.library.lib")
> 2. created Test App project (package "test.library.app") and set it to
> use Test Library
> 3. Test Library got LibActivity class which simply referes to
> lib_main.xml layout
> 4. I defined that activity in Test App manifest file:
>
> <activity android:name="test.library.lib.LibActivity"
> android:label="@string/app_name"
> android:theme="@android:style/Theme.Dialog"
> >
> <intent-filter>
> <action android:name="android.intent.action.MAIN" />
> <category android:name="android.intent.category.LAUNCHER" />
> </intent-filter>
> </activity>
>
> The problem is that Eclipse now compains "Class
> test.library.lib.LibActivity" does not exists". I also got same
> problem when I i.e. create a class in Test App that refers to classes
> in library. Import test.library.lib.*; does not help. SDK version is
> recent. Target sdk=3 (tried setting to 8, but made no difference)
>
> There's TicTacToe exaple on developer website and it's exactly done
> same way, so I am a bit confused What am I doing wrong here?
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en