android-maven-plugin: Disable debug build for apk

后端 未结 1 800
无人及你
无人及你 2020-12-15 07:19

I am not clear about the exact procedure for disabling debug build while building with android-maven-plugin:

I understand that the export wizard with ADT(21.1) will

相关标签:
1条回答
  • 2020-12-15 08:05

    Check out changelog for Android Maven Plugin 3.5.0 - released 2012-12-18:

    ATTENTION

    Since non-release builds are now debuggable by default you NEED TO ensure that the release parameter is set to true in your release build.

    In the pom this would be e.g.

    <groupId>com.jayway.maven.plugins.android.generation2</groupId>
    <artifactId>android-maven-plugin</artifactId>
    <configuration>
        <release>true</release>
    

    or you could activate on the command line with e.g

    mvn clean deploy -Dandroid.release=true
    

    or if you use the release plugin just add the above pom config to the release profile.

    Source Code:

    com/jayway/maven/plugins/android/phase09package/ApkMojo.java

    Related Pull Request:

    • Non-release builds will now automatically be debuggable
    • Support BuildConfig generation

    Off Topic:

    For logging management, A more elegant and strategic way is to use Proguard remove all log call at project release phase, see answer here for more details.

    0 讨论(0)
提交回复
热议问题