0
package com.example.sawsanalzoubi.vision;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;

so in "import org.opencv.android.OpenCVLoader" i have encounter the following error :

unused import statement  

import org.opencv.android.OpenCVLoader;
public class MainActivity extends AppCompatActivity {
private static  final String TAG="MainActivity";
static
{
if(!OpenCVLoader.initDebug){Log.d(TAG,"OpenCV not loaded");
}
    else
{
     Log.d(TAG,"OpenCV loaded");
 }
}
static{ System.loadLibrary("opencv_java3"); }
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
}
}

this is a picture of the code this is the video that I have followed

Now here goes my errors :

 1)Error:Dependency Vision:openCVLibrary300:unspecified on project app resolves to an APK archive which is not supported as a compilation dependency. File: C:\Users\...\outputs\apk\openCVLibrary300-release-unsigned.apk

2)Error:Library projects cannot set applicationId. applicationId is set to 'com.example.user.vision' in default config.

I have tried every thing I have found this method and this one a solution to a similar question and still nothing worked

Community
  • 1
  • 1

1 Answers1

0

so I ended up solving the problem by the help of this person

The error appears when you are trying to add a dependency which is an APK using: apply plugin: 'com.android.application' tells Gradle to build it as an application, generating an APK using:

apply plugin: 'com.android.library' it will build as a library, generating an AAR. for more details check this link

Community
  • 1
  • 1
  • but I ended up having another error Error:Library projects cannot set applicationId. applicationId is set to 'com.example.sawsanalzoubi.vision' in default config. – Aisha Alkateeb Sep 20 '16 at 11:03