Tôi đang cố gắng sửa đổi API FingerprintGestureController trong AOSP (nhánh chính) để trả về boolean chứ không phải là void nhưng tôi vẫn gặp lỗi khi xây dựng dự án ngay cả sau khi biên dịch lại SDK.Sửa đổi SDK SDK trong AOSP
Lỗi là:
FAILED: out/target/common/obj/PACKAGING/checkpublicapi-last-timestamp
/bin/bash -c "((out/host/linux-x86/bin/apicheck -JXmx1024m -J\"classpath /usr/lib/jvm/java-8-openjdk-amd64/bin/../lib/tools.jar:out/host/linux-x86/framework/doclava.jar:out/host/linux-x86/framework/jsilver.jar\" -hide 2 -hide 3 -hide 4 -hide 5 -hide 6 -hide 24 -hide 25 -hide 26 -hide 27 -error 7 -error 8 -error 9 -error 10 -error 11 -error 12 -error 13 -error 14 -error 15 -error 16 -error 17 -error 18 prebuilts/sdk/api/26.txt out/target/common/obj/PACKAGING/public_api.txt frameworks/base/api/removed.txt out/target/common/obj/PACKAGING/removed.txt || ( cat build/core/apicheck_msg_last.txt ; exit 38))) && (mkdir -p out/target/common/obj/PACKAGING/) && (touch out/target/common/obj/PACKAGING/checkpublicapi-last-timestamp)"
out/target/common/obj/PACKAGING/public_api.txt:2874: error 16: Method android.accessibilityservice.FingerprintGestureController.FingerprintGestureCallback.onGestureDetected(int) has changed return type from Primitive?: true TypeVariable?: false Wildcard?: false Dimension: QualifedTypeName: void to Primitive?: true TypeVariable?: false Wildcard?: false Dimension: QualifedTypeName: boolean
******************************
You have tried to change the API from what has been previously released in
an SDK. Please fix the errors listed above.
******************************
bước Tôi đi theo để biên dịch là:
lunch sdk-eng
make update-api //Success
make sdk //Success
lunch 1
make -j10 //Errors out here
Ai đó có thể xin vui lòng hướng dẫn làm thế nào tôi có thể thay đổi của Android phát hành SDK API trong mã nguồn và biên dịch android.
'onGestureDetected' là một callback interface. Mục đích nào bạn có được từ việc trở thành kiểu trả về boolean và cố gắng chặn cuộc gọi phương thức? –
Tôi muốn tìm hiểu xem ứng dụng đã nhận được cuộc gọi lại dấu vân tay đã tiêu thụ sự kiện hay chưa, tương tự như các sự kiện onTouch của Chế độ xem. – user531069
Và tại sao nó không? Nếu thiết bị không có cảm biến vân tay? –