Hi there,

Following up from this thread:
http://groups.google.com/group/android-porting/browse_thread/thread/c6e60541605a742d/191aa0ae2c1e26a2
I've been trying to build FooBarApp referencing FooBarLib using the
Android Build System - it works fine under ADT.

This is what the Android.mk look like:

LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_SRC_FILES += $(call all-java-files-under, ../FooBarLib/src)
LOCAL_PACKAGE_NAME := FooBarApp
LOCAL_RESOURCE_DIR += ../FooBarLib/res res
include $(BUILD_PACKAGE)
include $(call all-makefiles-under,$(LOCAL_PATH))

This gives me a whole bunch of errors that look like this:

vendor/myvendor/packages/FooBarApp/src/mypackage/FooBarApp.java:20:
package R does not exist
vendor/myvendor/packages/FooBarLib/src/mypackage/FooBarLib.java:56:
package R does not exist

It looks like the R.java isn't generated. Trying to add "import
mypackage.R" gives this error:

vendor/myvendor/packages/FooBarApp/src/mypackage/FooBarApp.java:16:
cannot find symbol
symbol  : class R
location: package mypackage
import mypackage.R;

Trying to build the app without the LOCAL_RESOURCE_DIR line gives this
error:

vendor/myvendor/packages/FooBarApp/res/layout/main.xml:8:  error: No
resource identifier found for attribute 'myattr' in package
'mypackage'

So it looks like the LOCAL_RESOURCE_DIR is working correctly to
reference the resources, but the R.java generated seems to be missing.

I'm using Froyo if that helps

Thanks

-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting

Reply via email to