I am compiling android source using following Android.mk file :
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_STATIC_JAVA_LIBRARIES := libarity
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := TouchPanelTest
include $(BUILD_PACKAGE)
##################################################
include $(CLEAR_VARS)
# Use the folloing include to make our test apk.
include $(call all-makefiles-under,$(LOCAL_PATH))
but it will give error :
main.xml:19: error: Error: This attribute must be localized. (at 'text' with value 'TOP_LEFT').
mail.xml is as follows :
<RelativeLayout
android:id="@+id/top_left"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:background="#000"
android:orientation="vertical" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TOP_LEFT" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/top_right"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:background="#000"
android:orientation="vertical" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TOP_RIGHT" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/bottom_left"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:background="#000"
android:orientation="vertical" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="BOTTOM_LEFT" />
</RelativeLayout>
You can use
LOCAL_MODULE_TAGS := tests
in the Android.mk to omits the localization check.
Another way is to disable localization check in build system. Comment the line 81 in build/core/package.mk
#LOCAL_AAPT_FLAGS := $(LOCAL_AAPT_FLAGS) -z
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With