Importing openCV module into Android Studio project - android

I am trying to import openCV module using Import Module and selecting /Users/apple/Downloads/OpenCV-android-sdk/sdk/java. I am getting below error when I hit next button and Android Studio tries to sync:
Error:A problem occurred configuring project ':openCVLibrary300'. > failed to find target with hash string 'android-14' in: /Users/apple/Library/Android/sdk Open Android SDK Manager.
Does anyone know what is going on?

I would suggest going to the Android SDK manager and donwloading the api with the number 14 , And for further use you should download all versions so problem like these wont occur

Related

After updating Android Studio, my project is giving an error: Could not find com.android.support:appcompat-v7:23.3.0

I'm new to Android programming. Today, after I updating Android Studio, my project (which was working) started giving an error:
Error:A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApkCopy'.
> Could not find com.android.support:appcompat-v7:23.3.0.
Required by:
POSv2:app:unspecified
Why is this happening? Did anyone experience something like this? I really don't know why this is happening.
So far the only solution is re-download the SDK, so i will create new folder and fresh download all the SDK there. I will update when im done!
update: I solve this issue by creating new folder, and fresh download the sdk there, then target the sdk folder to that folder.
Open the Android SDK Manager (separately or from Android Studio itself) and make sure you have the API 23 SDK and the "Support Repository" downloaded (scroll to the bottom).
If you want to see what versions you do have available, then the directory is at
ANDROID_SDK/extras/android/m2repository/com/android/support/appcompat-v7/
Otherwise, that error is strange because you should be able to have Gradle download that library if it is missing, so best guess is that the SDK libraries got updated and/or cleaned.

I am getting the following error when I am trying to import an existing android studio project.Is there any solution for this?

The error is "The patch c:\android-sdk-windows does not belong to a directory.Android studio will use this Andriod SDK instead C:\Users\username\AppData\Local\Android\sdk' and will modify the project's local.properties file.
I am getting the following error when I am trying to import an android sdk project in Android studio
You don't have any problems. Just press ok and then set correct path of Android SDK if needed.

Android Studio doesnt open project correctly

When I import or open a project it doesn't open correctly and in the event log I get the message "Frameworks detected: Android framework is detected in the project Configure". Searching in google it says to install the support library but it's already installed
SOLUTION
Refer to the answer to this question
I ran into the same problems while opening a project. Please make sure when the Android Studio do the conversion or build the Gradle files , you look into the Gradle's build file and check which particular version's SDK and build tools are required to build this particular project. Then also confirm from the SDK Manager (Tools->Android->SDK Manager) that tools of given version are installed.

Project failed to complete the Gradle sync.

Whenever I try to run a gradle sync on my project i keep getting this error:
Failed to refresh Gradle project 'MeetupVersion1.0'
Unable to load class 'org.gradle.plugins.ide.internal.IdeDependenciesExtractor$IdeDependency'.
How do I fix this error? Do I have to import this class or does it have to do with my Android Studio?
This tends to happen when you're trying to use a build file that specifies a version of the Android Gradle plugin that's too new for the given version of Android Studio to handle. I'd suggest updating Android Studio.
If you continue to have problems, amend you question with the version of Android Studio you're using and the contents of your build files.
This is written up in bug https://code.google.com/p/android/issues/detail?id=66325 though the bug report doesn't really have any detail other than a couple reports that people solved it by upgrading.

can not create new Android project using Android Studio

I am trying to create Android project using Android studio.
I have installed the latest Android studio and update it using the help-check for updates.
Then I tried to create my first Android project, however after the studio download the gradle, it throw a error:
Gradle: A problem occurred configuring project ':FirstAndroid'.
> Failed to notify project evaluation listener.
> Could not resolve all dependencies for configuration ':FirstAndroid:_DebugCompile'.
> Could not find any version that matches com.android.support:appcompat-v7:+.
Required by:
FirstAndroidProject:FirstAndroid:unspecified
I am not sure what's the problem.
Anyone can do me a favor?
I am sorry , I think I made a mistake before I ask this questions.
Before using Android studio , I have used eclipse and Idea together with a standalone Android sdk while this sdk cover almost all the required components.
However when I install Android studio, it use its internal sdk which do not include the components like com.android.support:appcompat-v7, after update the sdk through the Android studio, the problem is solved.
It says com.android.support:appcompat-v7 -- maybe, you need to install v7 support?
I have to note that the last time I needed to create a new project, I found the tools in a poor state: to create a project that could compile from both Eclipse and command line I had to create two new projects and manually copy files from one to another (otherwise I was getting a crazy error about null returning 1).
I was getting the same message. (Working on Mac, Android Studio 0.4.5)
Simply updating the SDK through the SDK Manager did correct the issue for me.
To correct the issue I opened the SDK manager (tools -> Android -> SDK Manager). Scrolled down to the bottom and found the Extras folder.
Downloading and installing the components in the Extras folder corrected the issue.

Categories

Resources