Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/144.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 编译4.4.4 KitKat(gralloc)时出错_Android_C++_Android 4.4 Kitkat - Fatal编程技术网

Android 编译4.4.4 KitKat(gralloc)时出错

Android 编译4.4.4 KitKat(gralloc)时出错,android,c++,android-4.4-kitkat,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

我犯了这个错误-

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]
frameworks/native/libs/gui/Surface.cpp:在成员函数“virtualandroid::status\u t android::Surface::lock(ANativeWindow\u Buffer*,ARect*)”中:
frameworks/native/libs/gui/Surface.cpp:828:29:错误:“GRALLOC\u USAGE\u PRIVATE\u INTERNAL\u ONLY”未在此范围内声明

target thumb C++:libprotobuf-cpp-2.3.0-lite在我看来,变量未在适当的范围内声明。。。检查第828行,查看该范围内是否只存在GRALLOC(使用)(专用)(内部)。注意其他块,它们是{}中代码的一部分。如果它在某个内部块中声明,并在该块外部使用,则它不再存在。您应该声明它,以便它存在于适当的范围内。

我在这里看到的是-#ifdef QCOM_BSP setUsage(mrequalsage&GRALLOC_USAGE(私人)仅外部| mrequalsage&GRALLOC_USAGE |仅内部| GRALLOC_USAGE(经常阅读| GRALLOC)USAGE(经常书写))#else设置用法(一般用法通常为读取,一般用法通常为写入)#endif}它在适当的范围内,仍然没有编译。