File tree Expand file tree Collapse file tree 8 files changed +27
-24
lines changed
androidTest/java/com/example/nativeopencvandroidtemplate
java/com/example/nativeopencvandroidtemplate
kotlin/com/example/nativeopencvandroidtemplate Expand file tree Collapse file tree 8 files changed +27
-24
lines changed Original file line number Diff line number Diff line change @@ -11,12 +11,12 @@ This sample Android application displays a live camera feed with an OpenCV *adap
11
11
| Tool | Version |
12
12
| --- | --- |
13
13
| [ OpenCV] ( https://opencv.org ) | 4.4.0
14
- | [ Android Studio] ( https://developer.android.com/studio ) | 3.6.2
15
- | [ Android Build Tool] ( https://developer.android.com/about ) | 29.0.1
16
- | [ Android NDK] ( https://developer.android.com/ndk/guides ) | Revision r20
17
- | [ Kotlin] ( https://kotlinlang.org/docs/reference/ ) | 1.3.50
18
- | [ Gradle] ( https://gradle.org ) | 5.4 .1
19
- | Mac OS | 10.15.4
14
+ | [ Android Studio] ( https://developer.android.com/studio ) | 4.0.1
15
+ | [ Android Build Tool] ( https://developer.android.com/about ) | 29.0.3
16
+ | [ Android NDK] ( https://developer.android.com/ndk/guides ) | r21d
17
+ | [ Kotlin] ( https://kotlinlang.org/docs/reference/ ) | 1.3.72
18
+ | [ Gradle] ( https://gradle.org ) | 6.1 .1
19
+ | Mac OS | 10.15.6
20
20
21
21
## How to use this repository
22
22
Original file line number Diff line number Diff line change @@ -5,15 +5,15 @@ apply plugin: 'kotlin-android'
5
5
apply plugin : ' kotlin-android-extensions'
6
6
7
7
android {
8
- compileSdkVersion 28
9
- buildToolsVersion " 29.0.1 "
8
+ compileSdkVersion 30
9
+ buildToolsVersion " 29.0.3 "
10
10
defaultConfig {
11
11
applicationId " com.example.nativeopencvandroidtemplate"
12
12
minSdkVersion 28
13
- targetSdkVersion 28
13
+ targetSdkVersion 30
14
14
versionCode 1
15
15
versionName " 1.0"
16
- testInstrumentationRunner " android.support. test.runner.AndroidJUnitRunner"
16
+ testInstrumentationRunner ' androidx. test.runner.AndroidJUnitRunner'
17
17
externalNativeBuild {
18
18
cmake {
19
19
cppFlags " -frtti -fexceptions"
@@ -34,15 +34,16 @@ android {
34
34
version " 3.10.2"
35
35
}
36
36
}
37
+ ndkVersion ' 21.3.6528147'
37
38
}
38
39
39
40
dependencies {
40
41
implementation fileTree(dir : ' libs' , include : [' *.jar' ])
41
42
implementation " org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version "
42
- implementation ' com.android.support :appcompat-v7:28.0 .0'
43
- implementation ' com.android.support.constraint:constraint-layout :1.1.3'
43
+ implementation ' androidx.appcompat :appcompat:1.2 .0'
44
+ implementation ' androidx.constraintlayout:constraintlayout :1.1.3'
44
45
testImplementation ' junit:junit:4.12'
45
- androidTestImplementation ' com.android.support. test:runner :1.0.2 '
46
- androidTestImplementation ' com.android.support. test.espresso:espresso-core:3.0.2 '
46
+ androidTestImplementation ' androidx. test.ext:junit :1.1.1 '
47
+ androidTestImplementation ' androidx. test.espresso:espresso-core:3.2.0 '
47
48
implementation project(path : ' :opencv' )
48
49
}
Original file line number Diff line number Diff line change 1
1
package com.example.nativeopencvandroidtemplate
2
2
3
- import android.support. test.InstrumentationRegistry
4
- import android.support. test.runner .AndroidJUnit4
3
+ import androidx. test.platform.app .InstrumentationRegistry
4
+ import androidx. test.ext.junit.runners .AndroidJUnit4
5
5
6
6
import org.junit.Test
7
7
import org.junit.runner.RunWith
@@ -18,7 +18,7 @@ class ExampleInstrumentedTest {
18
18
@Test
19
19
fun useAppContext () {
20
20
// Context of the app under test.
21
- val appContext = InstrumentationRegistry .getTargetContext()
21
+ val appContext = InstrumentationRegistry .getInstrumentation().targetContext
22
22
assertEquals(" com.example.nativeopencvandroidtemplate" , appContext.packageName)
23
23
}
24
24
}
Original file line number Diff line number Diff line change 4
4
//import android.app.Activity;
5
5
//import android.content.pm.PackageManager;
6
6
//import android.os.Bundle;
7
- //import android.support.v4 .app.ActivityCompat;
7
+ //import androidx.core .app.ActivityCompat;
8
8
//import android.util.Log;
9
9
//import android.view.SurfaceView;
10
10
//import android.view.WindowManager;
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import android.Manifest
4
4
import android.app.Activity
5
5
import android.content.pm.PackageManager
6
6
import android.os.Bundle
7
- import android.support.v4 .app.ActivityCompat
7
+ import androidx.core .app.ActivityCompat
8
8
import android.util.Log
9
9
import android.view.SurfaceView
10
10
import android.view.WindowManager
Original file line number Diff line number Diff line change 1
1
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2
2
3
3
buildscript {
4
- ext. kotlin_version = ' 1.3.50 '
4
+ ext. kotlin_version = ' 1.3.72 '
5
5
repositories {
6
6
google()
7
7
jcenter()
8
8
9
9
}
10
10
dependencies {
11
- classpath ' com.android.tools.build:gradle:3.5 .1'
11
+ classpath ' com.android.tools.build:gradle:4.0 .1'
12
12
classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version "
13
13
// NOTE: Do not place your application dependencies here; they belong
14
14
// in the individual module build.gradle files
Original file line number Diff line number Diff line change @@ -13,5 +13,7 @@ org.gradle.jvmargs=-Xmx1536m
13
13
# org.gradle.parallel=true
14
14
# Kotlin code style for this project: "official" or "obsolete":
15
15
kotlin.code.style =official
16
+ android.useAndroidX =true
17
+ android.enableJetifier =true
16
18
17
- opencvsdk =/Users/Example/Downloads/OpenCV-android-sdk
19
+ opencvsdk =/Users/Example/Downloads/OpenCV-android-sdk
Original file line number Diff line number Diff line change 1
- # Mon Sep 09 21:23:30 CEST 2019
1
+ # Mon Aug 17 14:18:33 CEST 2020
2
2
distributionBase =GRADLE_USER_HOME
3
3
distributionPath =wrapper/dists
4
4
zipStoreBase =GRADLE_USER_HOME
5
5
zipStorePath =wrapper/dists
6
- distributionUrl =https\://services.gradle.org/distributions/gradle-5.4 .1-all.zip
6
+ distributionUrl =https\://services.gradle.org/distributions/gradle-6.1 .1-all.zip
You can’t perform that action at this time.
0 commit comments