Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Android samples for modern Android studio. Added OpenCV from Maven support. #24473

Merged
merged 14 commits into from
Nov 17, 2023

Conversation

alexlyulkov
Copy link
Contributor

@alexlyulkov alexlyulkov commented Oct 31, 2023

Updated samples for recent Android studio:

  • added namespace field that is required in build.gradle files
  • replaced switch by if-else because it doesn't work with constants from resources
  • added missed log library dependency in face-detection/jni/CMakeLists.txt
  • use local.properties to define NDK location

Added support for OpenCV from Maven. Now you can choose 3 possible sources of OpenCV lib in settings.gradle: SDK path, local Maven repository, public Maven repository. (Creating Maven repository from SDK is added here #24456 )

There are differences in project configs for SDK and Maven versions:

  • different dependencies in build.gradle
  • different OpenCV library names in CMakeLists.txt
  • SDK version requires OpenCV_DIR definition

Requires:

@asmorkalov
Copy link
Contributor

Namespace related: #23447

Copy link
Contributor

@asmorkalov asmorkalov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -136,23 +136,22 @@ public boolean onPrepareOptionsMenu (Menu menu) {

@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.github/workflows/PR-4.x.yaml Outdated Show resolved Hide resolved
@asmorkalov asmorkalov merged commit 6c57ce9 into opencv:4.x Nov 17, 2023
24 of 26 checks passed
IskXCr pushed a commit to Haosonn/opencv that referenced this pull request Dec 20, 2023
Updated Android samples for modern Android studio. Added OpenCV from Maven support. opencv#24473

Updated samples for recent Android studio:

- added namespace field that is required in build.gradle files
- replaced _switch_ by _if-else_ because it doesn't work with constants from resources
- added missed log library dependency in face-detection/jni/CMakeLists.txt
- use local.properties to define NDK location

Added support for OpenCV from Maven. Now you can choose 3 possible sources of OpenCV lib in settings.gradle: SDK path, local Maven repository, public Maven repository. (Creating Maven repository from SDK is added here opencv#24456 )

There are differences in project configs for SDK and Maven versions:

- different dependencies in build.gradle
- different OpenCV library names in CMakeLists.txt
- SDK version requires OpenCV_DIR definition

Requires:
- opencv/ci-gha-workflow#124
- opencv-infrastructure/opencv-gha-dockerfile#26
thewoz pushed a commit to thewoz/opencv that referenced this pull request Jan 4, 2024
Updated Android samples for modern Android studio. Added OpenCV from Maven support. opencv#24473

Updated samples for recent Android studio:

- added namespace field that is required in build.gradle files
- replaced _switch_ by _if-else_ because it doesn't work with constants from resources
- added missed log library dependency in face-detection/jni/CMakeLists.txt
- use local.properties to define NDK location

Added support for OpenCV from Maven. Now you can choose 3 possible sources of OpenCV lib in settings.gradle: SDK path, local Maven repository, public Maven repository. (Creating Maven repository from SDK is added here opencv#24456 )

There are differences in project configs for SDK and Maven versions:

- different dependencies in build.gradle
- different OpenCV library names in CMakeLists.txt
- SDK version requires OpenCV_DIR definition

Requires:
- opencv/ci-gha-workflow#124
- opencv-infrastructure/opencv-gha-dockerfile#26
@asmorkalov asmorkalov mentioned this pull request Jan 19, 2024
thewoz pushed a commit to thewoz/opencv that referenced this pull request May 29, 2024
Updated Android samples for modern Android studio. Added OpenCV from Maven support. opencv#24473

Updated samples for recent Android studio:

- added namespace field that is required in build.gradle files
- replaced _switch_ by _if-else_ because it doesn't work with constants from resources
- added missed log library dependency in face-detection/jni/CMakeLists.txt
- use local.properties to define NDK location

Added support for OpenCV from Maven. Now you can choose 3 possible sources of OpenCV lib in settings.gradle: SDK path, local Maven repository, public Maven repository. (Creating Maven repository from SDK is added here opencv#24456 )

There are differences in project configs for SDK and Maven versions:

- different dependencies in build.gradle
- different OpenCV library names in CMakeLists.txt
- SDK version requires OpenCV_DIR definition

Requires:
- opencv/ci-gha-workflow#124
- opencv-infrastructure/opencv-gha-dockerfile#26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants