I downloaded the newest source code of Android form git,
and I managed to compile the source code and made a SDK and a emulator with the verison AOSP.
Then I tried to modified the source code of LatinIME the input-method and managed to compile and run on the emulator compiled along with the code of version AOSP.
Then I want to install the apk to my phone whose sdk-version is 2.2, and the error appeared to say my sdk-version is too low.
I’m sure I’ve add the <uses-sdk android:minSdkVersion="8" /> in the manifest node in AndroidManifest.xml , but it still needs the AOSP version to install.
Is that means I will have to repo the 2.2 version source code to compile the apk so it can fit my phone?
OK, I’m answering my own question again, I can’t understand why my questions always rarely answered.
However I searched the whole Internet and can find a answer, but in luck I saw this:
version_defaults.mk of API Key 7
I simply replaced the android/build/core/version_defaults.mk in my downloaded code tree and re-compiled the module, and it worked!
Thought I don’t know if it will work all modules in the source code, but however my IME works good.