編譯出錯:
out/target/common/obj/PACKAGING/public_api.txt:22549: error 17: Field android.view.KeyEvent.KEYCODE_STAR has changed value from 17 to 227
out/target/common/obj/PACKAGING/public_api.txt:22636: error 17: Field android.view.KeyEvent.KEYCODE_POUND has changed value from 18 to 228
******************************
You have tried to change the API from what has been previously released in
an SDK. Please fix the errors listed above.
******************************
解決辦法:
自己找到了在framework/base/api 下有n(n取決於你原始碼的版本,如果你原始碼的版本是4.0.4 ,那麼就 有分別以 1~ 15命名的xml或txt,就是api level)個xml或txt文件,分別對應android api 的不同版本。 在這些xml中,把你在framework層中修改的地方對應進去。 如我這個錯誤的地方,在15.txt 和 current.xml 中找到“KEYCODE_STAR”,把裡面的value 值改成和你程式碼中值一致就可以了。