How to assign the resource id in android?
<p>How to assign the resource id in android? I use <code>aapt dump resources</code> to browser a normal application  resource:</p>

<pre><code>Package Groups (1)
Package Group 0 id=127 packageCount=1 name=com.android.picker
  Package 0 id=127 name=com.android.picker typeCount=5
    type 0 configCount=0 entryCount=0
    type 1 configCount=1 entryCount=7
      spec resource 0x7f020000 com.android.picker:drawable/btn_normal: flags=0x00000000
      spec resource 0x7f020001 com.android.picker:drawable/icon: flags=0x00000000
      spec resource 0x7f020002 com.android.picker:drawable/icon1: flags=0x00000000
.......
</code></pre>

<p>From the above message, I can found the resource id  start with 127(0x7f).And I browser another application resouce:</p>

<pre><code>Package Groups (1)
Package Group 0 id=2 packageCount=1 name=com.android.pinkskin
  Package 0 id=2 name=com.android.pinkskin typeCount=6
    type 0 configCount=0 entryCount=0
    type 1 configCount=1 entryCount=7
      spec resource 0x02020000 com.android.pinkskin:drawable/btn_default: flags=0x00000000
      spec resource 0x02020001 com.android.pinkskin:drawable/btn_default_normal: flags=0x00000000
      spec resource 0x02020002 com.android.pinkskin:drawable/btn_default_normal_disable: flags=0x00000000
      spec resource 0x02020003 com.android.pinkskin:drawable/btn_default_normal_disable_focused: flags=0x00000000
.........
</code></pre>

<p>The difference between the two applications is their make file:
The com.android.picker make file is:</p>

<pre><code>LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_MODULE_TAGS := optional

LOCAL_SRC_FILES := $(call all-java-files-under, src)

LOCAL_PACKAGE_NAME := Picker


include $(BUILD_PACKAGE)
</code></pre>

<p>and the make file of  com.android.pinkskin application is:</p>

<pre><code>LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_MODULE_TAGS := optional

LOCAL_SRC_FILES := $(call all-java-files-under, src)

LOCAL_PACKAGE_NAME := PiknSkin
LOCAL_AAPT_FLAGS := -x

LOCAL_EXPORT_PACKAGE_RESOURCES := true

include $(BUILD_PACKAGE)
</code></pre>

<p>I found <a href="http://stackoverflow.com/questions/5130789/android-resource-ids">Android resource id always have a package identifier, so their value cannot be 0. – Romain Guy</a>. Who can explain this?</p>
