zoukankan      html  css  js  c++  java
  • out/target/common/obj/PACKAGING/public_api.txt android.view.KeyEvent.KEYCODE_has changed value from

    编译出错:

    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 值改成和你代码中值一致就可以了。

  • 相关阅读:
    Codeforces_739_B
    Codeforces_732_D
    D
    C
    E
    商汤AI园区的n个路口(中等)
    D. The Fair Nut and the Best Path
    HDU6446
    分解质因数(线性筛)
    D. Extra Element
  • 原文地址:https://www.cnblogs.com/riskyer/p/3278122.html
Copyright © 2011-2022 走看看