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

Support bounding targetSdkVersion between minSdkVersion and maxSdkVer… #1615

Merged
merged 1 commit into from Sep 19, 2017

Conversation

Projects
None yet
2 participants
@janvidar

janvidar commented Sep 15, 2017

…sion

It is possible to create a an AndroidStudio project that uses the following
nonsense settings:

defaultConfig {
    minSdkVersion 15
    maxSdkVersion 19
    targetSdkVersion 25
}

The application is successfully built by Android Studio, and the APK
works when installed on the relevant devices, however the app cannot
be re-built with Apktool afterwards.

This patch works around the problem by explicitly setting the
targetSdkVersion to the max of the maxSdkVersion and min of the minSdkVersion
only if these are specified.

Jan Vidar Krey
Support bounding targetSdkVersion between minSdkVersion and maxSdkVer…
…sion

It is possible to create a an AndroidStudio project that uses the following
nonsense settings:

    defaultConfig {
        minSdkVersion 15
        maxSdkVersion 19
        targetSdkVersion 25
    }

The application is successfully built by Android Studio, and the APK
works when installed on the relevant devices, however the app cannot
be re-built with Apktool afterwards.

This patch works around the problem by explicitly setting the
targetSdkVersion to the max of the maxSdkVersion and min of the minSdkVersion
only if these are specified.
@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Sep 15, 2017

Owner

Thanks for the PR. I'll take a look soon

Owner

iBotPeaches commented Sep 15, 2017

Thanks for the PR. I'll take a look soon

@iBotPeaches iBotPeaches merged commit 5f0d53b into iBotPeaches:master Sep 19, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Sep 19, 2017

Owner

Thanks! Added some tests and merged it in.

Owner

iBotPeaches commented Sep 19, 2017

Thanks! Added some tests and merged it in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment