编译4.4.4 KitKat(gralloc)

时间:2015-06-12 14:23:01

标签: android c++ android-4.4-kitkat

我收到了这个错误 -

frameworks/native/libs/gui/Surface.cpp: In member function 'virtual android::status_t android::Surface::lock(ANativeWindow_Buffer*, ARect*)':
frameworks/native/libs/gui/Surface.cpp:828:29: error: 'GRALLOC_USAGE_PRIVATE_INTERNAL_ONLY' was not declared in this scope
target thumb C++: libprotobuf-cpp-2.3.0-lite <= external/protobuf/src/google/protobuf/repeated_field.cc
make: *** [/home/aniket/candykat-kk/out/target/product/cancro/obj/SHARED_LIBRARIES/libgui_intermediates/Surface.o] Error 1
make: *** Waiting for unfinished jobs....
external/protobuf/src/google/protobuf/stubs/common.cc: In function 'void google::protobuf::ShutdownProtobufLibrary()':
external/protobuf/src/google/protobuf/stubs/common.cc:355:58: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

我不知道该怎么做,搜索谷歌但无法找到相关的答案。

1 个答案:

答案 0 :(得分:0)

在我看来,变量未在适当的范围内声明...检查第828行并查看该范围内是否存在GRALLOC_USAGE_PRIVATE_INTERNAL_ONLY。注意其他块,它们是{}中代码的一部分。如果它在某个内部块中声明,并在该块之外使用,则它不再存在。您应该声明它以使其存在于适当的范围内。