无法解析Android Studio中的OpenCV 2导入?

时间:2019-02-07 12:14:39

标签: opencv android-studio-3.0

我已经在android studio项目中导入了opensdk模块,并在链接c ++文件后在opencv模块中给出了错误。

缺少的进口商品:

import org.opencv.R;
import org.opencv.BuildConfig;

如何导入这些未找到的包。

这是我收到的错误

Compilation failed; see the compiler error output for details.

errors i recieve

 org/opencv/android/CameraGLSurfaceView.java
  error: cannot find symbol class R
  error: package R does not exist
  error: package R does not exist
org/opencv/android/CameraBridgeViewBase.java    
  error: cannot find symbol class R 
  error: package R does not exist   
  error: package R does not exist
org/opencv/android/JavaCameraView.java  
  error: cannot find symbol class BuildConfig   
  error: illegal start of type

在Logcat中

2019-02-07 17:34:19.249 1546-1689/? E/AudioFlinger: createRecordTrack_l() initCheck failed -12; no control block?
2019-02-07 17:34:19.250 2975-28257/com.google.android.googlequicksearchbox:search E/AudioRecord: AudioFlinger could not create record track, status: -12
2019-02-07 17:34:19.259 2975-28257/com.google.android.googlequicksearchbox:search E/AudioRecord-JNI: Error creating AudioRecord instance: initialization check failed with status -12.
2019-02-07 17:34:19.259 2975-28257/com.google.android.googlequicksearchbox:search E/android.media.AudioRecord: Error code -20 when initializing native AudioRecord object.
2019-02-07 17:34:19.259 2975-28257/com.google.android.googlequicksearchbox:search I/MicrophoneInputStream: mic_started com.google.android.apps.gsa.staticplugins.aa.c@1ec9d7
2019-02-07 17:34:19.301 2975-28257/com.google.android.googlequicksearchbox:search I/MicrophoneInputStream: mic_close com.google.android.apps.gsa.staticplugins.aa.c@1ec9d7
2019-02-07 17:34:19.302 2975-2975/com.google.android.googlequicksearchbox:search I/MicroDetectionWorker: onReady
2019-02-07 17:34:19.303 2975-28255/com.google.android.googlequicksearchbox:search I/MicroRecognitionRunner: Detection finished
2019-02-07 17:34:19.303 2975-28255/com.google.android.googlequicksearchbox:search W/ErrorReporter: reportError [type: 211, code: 524300]: Error reading from input stream
2019-02-07 17:34:19.303 2975-3135/com.google.android.googlequicksearchbox:search I/MicroRecognitionRunner: Stopping hotword detection.
2019-02-07 17:34:19.303 2975-28255/com.google.android.googlequicksearchbox:search W/ErrorProcessor: onFatalError, processing error from engine(4)
    com.google.android.apps.gsa.shared.speech.b.g: Error reading from input stream
        at com.google.android.apps.gsa.staticplugins.recognizer.j.a.a(SourceFile:28)
        at com.google.android.apps.gsa.staticplugins.recognizer.j.b.run(SourceFile:15)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at com.google.android.apps.gsa.shared.util.concurrent.a.ax.run(SourceFile:14)
        at com.google.android.apps.gsa.shared.util.concurrent.a.bl.run(SourceFile:4)
        at com.google.android.apps.gsa.shared.util.concurrent.a.bl.run(SourceFile:4)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
        at java.lang.Thread.run(Thread.java:764)
        at com.google.android.apps.gsa.shared.util.concurrent.a.ai.run(SourceFile:6)
     Caused by: com.google.android.apps.gsa.shared.exception.GsaIOException: Error code: 393238 | Buffer overflow, no available space.
        at com.google.android.apps.gsa.speech.audio.Tee.f(SourceFile:103)
        at com.google.android.apps.gsa.speech.audio.au.read(SourceFile:2)
        at java.io.InputStream.read(InputStream.java:101)
        at com.google.android.apps.gsa.speech.audio.ao.run(SourceFile:18)
        at com.google.android.apps.gsa.speech.audio.an.run(SourceFile:2)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457) 
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
        at com.google.android.apps.gsa.shared.util.concurrent.a.ax.run(SourceFile:14) 
        at com.google.android.apps.gsa.shared.util.concurrent.a.bl.run(SourceFile:4) 
        at com.google.android.apps.gsa.shared.util.concurrent.a.bl.run(SourceFile:4) 
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) 
        at java.lang.Thread.run(Thread.java:764) 
        at com.google.android.apps.gsa.shared.util.concurrent.a.ai.run(SourceFile:6) 
2019-02-07 17:34:19.303 2975-28255/com.google.android.googlequicksearchbox:search I/AudioController: internalShutdown
2019-02-07 17:34:19.307 2975-2975/com.google.android.googlequicksearchbox:search I/MicroDetector: Keeping mic open: false
2019-02-07 17:34:19.308 2975-2975/com.google.android.googlequicksearchbox:search I/MicroDetectionWorker: #onError(false)
2019-02-07 17:34:19.309 2975-28687/com.google.android.googlequicksearchbox:search I/DeviceStateChecker: DeviceStateChecker cancelled
2019-02-07 17:34:22.461 2418-25562/com.google.android.gms.persistent W/ctxmgr: [AclManager]No 2 for (accnt=account#-517948760#, com.google.android.gms(10013):IndoorOutdoorProducer, vrsn=13280000, 0, 3pPkg = null ,  3pMdlId = null ,  pid = 2418). Was: 3 for 57, account#-517948760#

0 个答案:

没有答案