0

I've followed these instructions for adding OpenCV to a gradle project, and it seemed to go okay, however in my source I can't import the OpenCV classes.

org.opencv seems to import ok, but not any of the sub-packages or classes. In Android Studio it looks like this:

enter image description here

As I type out the package name, after org.opencv. the only suggestion is *.

What could I be doing wrong?

Community
  • 1
  • 1
fredley
  • 32,953
  • 42
  • 145
  • 236
  • You could try to "Sync Project with Gradle Files" (-> Tools -> Android), or reimport your project, or you can try to open your project by selecting the `settings.gradle` file in the root directory of your project. – owe Jan 13 '14 at 12:18
  • Have you tried sync project with gradle using button available in tool bar. – Piyush Agarwal Jan 13 '14 at 12:43
  • So I actually made it a module in Android Studio and rebuilt the project, that seems to have fixed it. – fredley Jan 13 '14 at 12:52
  • If anyone else is seeing this, http://stackoverflow.com/questions/21100688/android-studio-0-4-2-suddenly-cannot-resolve-symbols may help. – Scott Barta Jan 13 '14 at 20:53

1 Answers1

0

I have had this issue with Android Studio a couple of times

I find it is resolved by closing and reopening the project when the project reloads it has worked.

If that does not work try close and reopen Android studio.

The third thing you could try is |File|Invalidate Cache Restart| .

Ryan Heitner
  • 13,119
  • 6
  • 77
  • 119