2015-06-23 12 views
9

निर्माण करते समय एपीआई परिवर्तन त्रुटि वर्तमान में एंड्रॉइड-5.1.0_r5 बनाने की कोशिश कर रहा है। मैंने स्रोतों की जांच की है और कोई संशोधन नहीं किया है। हालांकि, संकलन करते समय मुझे निम्न त्रुटि मिलती है।एओएसपी 5.1

Checking API: checkpublicapi-current 
out/target/common/obj/PACKAGING/public_api.txt:20: error 5: Added public field android.Manifest.permission.BACKUP 
out/target/common/obj/PACKAGING/public_api.txt:82: error 5: Added public field android.Manifest.permission.INVOKE_CARRIER_SETUP 
out/target/common/obj/PACKAGING/public_api.txt:106: error 5: Added public field android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE 
out/target/common/obj/PACKAGING/public_api.txt:116: error 5: Added public field android.Manifest.permission.RECEIVE_EMERGENCY_BROADCAST 

****************************** 
You have tried to change the API from what has been previously approved. 

To make these errors go away, you have two choices: 
    1) You can add "@hide" javadoc comments to the methods, etc. listed in the 
     errors above. 

    2) You can update current.txt by executing the following command: 
     make update-api 

     To submit the revised current.txt to the main Android repository, 
     you will need approval. 
****************************** 

और सार्वजनिक एपीआई txt फ़ाइलें diffing वास्तव में एक अंतर दिखाती है।

diff frameworks/base/api/current.txt out/target/common/obj/PACKAGING/public_api.txt 
19a20 
>  field public static final java.lang.String BACKUP = "android.permission.BACKUP"; 
80a82 
>  field public static final java.lang.String INVOKE_CARRIER_SETUP = "android.permission.INVOKE_CARRIER_SETUP"; 
103a106 
>  field public static final java.lang.String READ_PRIVILEGED_PHONE_STATE = "android.permission.READ_PRIVILEGED_PHONE_STATE"; 
112a116 
>  field public static final java.lang.String RECEIVE_EMERGENCY_BROADCAST = "android.permission.RECEIVE_EMERGENCY_BROADCAST"; 

हालांकि, मैं यह नहीं समझ सकता कि वे अतिरिक्त सार्वजनिक क्षेत्र कहां से आ रहे हैं। कोई विचार?

उत्तर

4

मुझे अपने आर 8 कोड में प्रविष्टियां दिखाई देती हैं, इसलिए आप संभवतः सुरक्षित-एपीआई बनाने के लिए सुरक्षित हैं, और जब यह खत्म हो जाता है तो अपने मेक कमांड को सामान्य के रूप में चलाएं।

9

अगर आप कुछ भी स्पर्श नहीं करते हैं तो 'अपडेट-एपीआई' न करें। वहां अतिरिक्त एपिस फॉर्म फ्रेमवर्क/बेस/रेज/एंड्रॉइडमैनीफेस्ट.एक्सएमएल को बुरी तरह से विश्लेषित किया गया है जो बग्गी सिस्टम/कोर/लिबकोर/स्ट्रिंग 8.cpp @@ removeAll() का उपयोग करता है, वे memcpy का उपयोग करते हैं लेकिन स्मृति में स्ट्रिंग ओवरलैपिंग के लिए memmove होना चाहिए।

यह नवीनतम डेबियन (एसआईडी) या उबंटू (16 शायद 15) बिल्ड मशीनों पर जारी है। यह libcore/String8.cpp में एक Google बग है। फिक्स यहां है: https://android.googlesource.com/platform/system/core/+/dd060f01f68ee0e633e9cae24c4e565cda2032bd

इस आदमी ने इसे (माइकल स्कॉट) और शायद कुछ अन्य लोगों को भी पाया। यहां उनकी जांच है: https://plus.google.com/+hashcode0f/posts/URHo3hBmfHY

खुद को बड़ा करो!

+0

> अगर आप कुछ भी छू नहीं पाते हैं तो 'अपडेट-एपीआई' न करें। यह सही लगता है। लेकिन मैं 6.0.1 एम 4 बी 30 जेड पर हूं। लेकिन लाइन 434 में, यह पहले से ही 'memmove (buf + tail, buf + index + skip, next - index - skip) है; ' इस मुद्दे के लिए एक और कारण प्रतीत होता है। –