1 सवाल: ndk में अज्ञात प्रकार का नाम 'ACameraDevice'

पर बनाया गया सवाल Sat, Mar 23, 2019 12:00 AM

मैं NDK के साथ android में opencv प्रोग्राम विकसित करना चाहता हूं, इसके लिए मैंने यह बनाने की कोशिश की एंड्रॉइड स्टूडियो में नमूना प्रोजेक्ट लेकिन जब प्रोजेक्ट बना तो ये त्रुटियां होती हैं:

Build command failed.
Error while executing process E:\SoftWare\Android\android-ndk-r19c\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\Users\127051\Documents\StudioProjects\StudioProjects\ImageProccessing\app\src\main\cpp\Android.mk NDK_APPLICATION_MK=C:\Users\127051\Documents\StudioProjects\StudioProjects\ImageProccessing\app\src\main\cpp\Application.mk APP_ABI=x86_64 NDK_ALL_ABIS=x86_64 NDK_DEBUG=1 APP_PLATFORM=android-21 NDK_OUT=C:/Users/127051/Documents/StudioProjects/StudioProjects/ImageProccessing/app/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=C:\Users\127051\Documents\StudioProjects\StudioProjects\ImageProccessing\app\build\intermediates\ndkBuild\debug\lib APP_CPPFLAGS+=-std=c++14 C:/Users/127051/Documents/StudioProjects/StudioProjects/ImageProccessing/app/build/intermediates/ndkBuild/debug/obj/local/x86_64/libopencv_ndk.so}

[x86_64] Compile++      : opencv_ndk <= native-lib.cpp

In file included from C:/Users/127051/Documents/StudioProjects/StudioProjects/ImageProccessing/app/src/main/cpp/native-lib.cpp:4:
In file included from C:/Users/127051/Documents/StudioProjects/StudioProjects/ImageProccessing/app/src/main/cpp/CV_Main.h:15:
C:/Users/127051/Documents/StudioProjects/StudioProjects/ImageProccessing/app/src/main/cpp/Native_Camera.h:15:55: error: unknown type name 'ACameraDevice'
static void CameraDeviceOnDisconnected(void* context, ACameraDevice* device) {
                                                      ^
C:/Users/127051/Documents/StudioProjects/StudioProjects/ImageProccessing/app/src/main/cpp/Native_Camera.h:18:48: error: unknown type name 'ACameraDevice'
static void CameraDeviceOnError(void* context, ACameraDevice* device,
                                               ^
C:/Users/127051/Documents/StudioProjects/StudioProjects/ImageProccessing/app/src/main/cpp/Native_Camera.h:25:35: error: unknown type name 'ACameraCaptureSession'
                                  ACameraCaptureSession* session) {
                                  ^
C:/Users/127051/Documents/StudioProjects/StudioProjects/ImageProccessing/app/src/main/cpp/Native_Camera.h:29:36: error: unknown type name 'ACameraCaptureSession'
                                   ACameraCaptureSession* session) {
                                   ^
C:/Users/127051/Documents/StudioProjects/StudioProjects/ImageProccessing/app/src/main/cpp/Native_Camera.h:52:3: error: unknown type name 'ACameraDevice'
  ACameraDevice* m_camera_device;
  ^
C:/Users/127051/Documents/StudioProjects/StudioProjects/ImageProccessing/app/src/main/cpp/Native_Camera.h:53:3: error: unknown type name 'ACaptureRequest'
  ACaptureRequest* m_capture_request;
  ^
C:/Users/127051/Documents/StudioProjects/StudioProjects/ImageProccessing/app/src/main/cpp/Native_Camera.h:54:3: error: unknown type name 'ACameraOutputTarget'
  ACameraOutputTarget* m_camera_output_target;
  ^
C:/Users/127051/Documents/StudioProjects/StudioProjects/ImageProccessing/app/src/main/cpp/Native_Camera.h:55:3: error: unknown type name 'ACaptureSessionOutput'
  ACaptureSessionOutput* m_session_output;
  ^
C:/Users/127051/Documents/StudioProjects/StudioProjects/ImageProccessing/app/src/main/cpp/Native_Camera.h:56:3: error: unknown type name 'ACaptureSessionOutputContainer'
  ACaptureSessionOutputContainer* m_capture_session_output_container;
  ^
C:/Users/127051/Documents/StudioProjects/StudioProjects/ImageProccessing/app/src/main/cpp/Native_Camera.h:57:3: error: unknown type name 'ACameraCaptureSession'
  ACameraCaptureSession* m_capture_session;
  ^
C:/Users/127051/Documents/StudioProjects/StudioProjects/ImageProccessing/app/src/main/cpp/Native_Camera.h:59:3: error: unknown type name 'ACameraDevice_StateCallbacks'
  ACameraDevice_StateCallbacks m_device_state_callbacks;
  ^
C:/Users/127051/Documents/StudioProjects/StudioProjects/ImageProccessing/app/src/main/cpp/Native_Camera.h:60:3: error: unknown type name 'ACameraCaptureSession_stateCallbacks'
  ACameraCaptureSession_stateCallbacks m_capture_session_state_callbacks;
  ^
C:/Users/127051/Documents/StudioProjects/StudioProjects/ImageProccessing/app/src/main/cpp/Native_Camera.h:62:3: error: unknown type name 'ACameraManager'
  ACameraManager* m_camera_manager;
  ^
C:/Users/127051/Documents/StudioProjects/StudioProjects/ImageProccessing/app/src/main/cpp/Native_Camera.h:64:3: error: unknown type name 'ACameraIdList'
  ACameraIdList* m_camera_id_list = NULL;
  ^
14 errors generated.
make: *** [C:/Users/127051/Documents/StudioProjects/StudioProjects/ImageProccessing/app/build/intermediates/ndkBuild/debug/obj/local/x86_64/objs-debug/opencv_ndk/native-lib.o] Error 1

पर्यावरण विवरण:

NDK संस्करण: r19c

होस्ट ओएस: विंडोज

IDE: Android Studio 3.3.2

SDK प्लेटफ़ॉर्म टूल: 28.0.2

एसडीके टूल्स: 25.2.5

    
0
1 उत्तर                              1                         

देशी कैमरा 2 API का उपयोग करने के लिए, अपना APP_PLATFORM से android-24 या उच्चतर सेट करें। एंड्रॉइड स्टूडियो में, यह build.gradle स्क्रिप्ट में minSdkVersion से मेल खाता है।

    
0
2019-03-24 10: 25: 40Z
स्रोत रखा गया यहाँ