Skip to content

Commit

Permalink
Upgraded Android Gradle build system
Browse files Browse the repository at this point in the history
  • Loading branch information
hsm4 committed Oct 20, 2023
1 parent b157413 commit 08c5408
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions apps/app_demo_slproject/android/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* Install **cmake** if the IDE states it as missing.
* Build the project with **Hammer button** or with **Build > Make Project (Ctrl-F9)**
* The app can only run on real but not on virtual devices because the prebuilt OpenCV libraries (_lib/prebuilt/Android) are only built for the arm architectures armeabi-v7a and arm64-v8a. To run the app in a virtual device you would have to build OpenCV also for Android on the x86 architecture.
* Your connected device must be enabled for development. See development settings under the system settings. Also the device must allow USB Debugging under the development settings.
* After successful build you can start the app on a USB-connected device by clicking the **green start button**.
* If your device is not listed in the **Deployment Targets** dialog please check again your USB driver. In some cases, you have to download the appropriate driver from the device manufacturer.

11 changes: 5 additions & 6 deletions apps/app_demo_slproject/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@ android {
assets.srcDirs = ['src/main/assets']
}
}
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
buildTypes {
release {
minifyEnabled false
Expand All @@ -59,6 +53,11 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
}
ndkVersion '21.4.7075529'
namespace 'ch.bfh.cpvrlab'
lint {
abortOnError false
checkReleaseBuilds false
}
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ch.bfh.cpvrlab"
android:versionCode="2"
android:versionName="3.0.000">

Expand Down
2 changes: 1 addition & 1 deletion apps/app_demo_slproject/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.1'
classpath 'com.android.tools.build:gradle:8.1.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
3 changes: 3 additions & 0 deletions apps/app_demo_slproject/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ org.gradle.daemon=true
org.gradle.warning.mode=all
android.useAndroidX=true
android.enableJetifier=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip

0 comments on commit 08c5408

Please sign in to comment.