Skip to content

Add Android SDK debug build flag - #14011

Merged
alalek merged 2 commits into
opencv:masterfrom
komakai:debug-build
Mar 11, 2019
Merged

alalek merged 2 commits into
opencv:masterfrom
komakai:debug-build

Conversation

@komakai

@komakai komakai commented Mar 9, 2019 •

Copy link
Copy Markdown
Contributor

resolves #14010

This pullrequest adds a flag "-debug" to platform/android/build_sdk.py which results in debuggable output binaries.

  • add build flag "--debug"
  • when flag is set then
    • set CMake build type to Debug
    • set CMake build flag BUILD_WITH_DEBUG_INFO to ON
    • invokes ninja with target "install" instead of "install/strip"
  • suppresses stripping of debug information in the SDK gradle build
  • fixes a bug in the DNN Java wrapper (missing LOG_TAG define)

@komakai

komakai commented Mar 9, 2019

Copy link
Copy Markdown
Contributor Author

Screenshot debugging OpenCV in Android Studio:
スクリーンショット 2019-03-09 14 58 34

@alalek alalek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Well done!

@alalek alalek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me 👍

@alalek
alalek merged commit 55f02d8 into opencv:master Mar 11, 2019
jveitchmichaelis pushed a commit to jveitchmichaelis/opencv that referenced this pull request Mar 12, 2019
* Add Android SDK debug build flag

* Change LOG_TAG define for consistency with other modules
@bommo1

bommo1 commented Mar 26, 2019

Copy link
Copy Markdown
Contributor

Could you please merge this into the 3.4 branch? Thanks!

@komakai

komakai commented Mar 27, 2019

Copy link
Copy Markdown
Contributor Author

@bommo1 the 3.4 Android build is totally different - there is no way to merge this.

a-sajjad72 pushed a commit to a-sajjad72/opencv that referenced this pull request Mar 30, 2023
* Add Android SDK debug build flag

* Change LOG_TAG define for consistency with other modules
SavyaSanchi-Sharma pushed a commit to SavyaSanchi-Sharma/opencv that referenced this pull request Jul 30, 2026
* Add Android SDK debug build flag

* Change LOG_TAG define for consistency with other modules
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.

Add Debug flag to Android SDK build

3 participants