Android Studio: Fix error about uses-sdk |
||||||
Issue descriptionError: The minSdk version should not be declared in the android manifest file. You can move the version from the manifest to the defaultConfig in the build.gradle file. Channel: canary Relevant: https://stackoverflow.com/questions/34234841/minsdk-and-targetsdk-in-androidmanifest-and-build-gradle-both
,
May 10 2018
,
May 18 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c216f89f89f3915bcd362fbe341417cacf79fa5a commit c216f89f89f3915bcd362fbe341417cacf79fa5a Author: Andrew Grieve <agrieve@chromium.org> Date: Fri May 18 21:22:52 2018 generate_gradle.py: Set minSdkVersion and targetSdkVersion Fixes Studio errors about minSdkVersion defaulting to 1. Bug: 841529 Change-Id: Ic9f029220a2c7d942d198154b72f6aeedcd73a0f Reviewed-on: https://chromium-review.googlesource.com/1066556 Reviewed-by: Dmitry Skiba <dskiba@chromium.org> Commit-Queue: agrieve <agrieve@chromium.org> Cr-Commit-Position: refs/heads/master@{#560046} [modify] https://crrev.com/c216f89f89f3915bcd362fbe341417cacf79fa5a/build/android/gradle/android.jinja [modify] https://crrev.com/c216f89f89f3915bcd362fbe341417cacf79fa5a/build/android/gradle/generate_gradle.py
,
Dec 20
When trying to debug using Android Studio, I got this error. It seems that the generated AndroidManifest.xml still contains min/maxSdk. Removing them from that file made the problem go away.
,
Dec 20
,
Dec 20
,
Jan 3
@dewittj - Not sure which AndroidManifest.xml you are using. The one used for the _all target does not have min/maxSdk: https://cs.chromium.org/chromium/src/build/android/gradle/AndroidManifest.xml?rcl=d39a30587e08602ffe70c08fd26f93a6be8dd8d5 Are you passing --target?
,
Jan 9
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3cffb80a89e4301ac35e65e3dfc7c4afc139bcd6 commit 3cffb80a89e4301ac35e65e3dfc7c4afc139bcd6 Author: Peter Wen <wnwen@chromium.org> Date: Wed Jan 09 15:08:12 2019 Android: Remove min/target api in gradle manifest Newer Android Studio versions explicitly disallow specifying min/target api versions in the Android Manifest.xml, preferring build.gradle instead. Bug: 841529 Change-Id: I0d9c340ea9b762aabbce91bc0067508bef6ff569 Reviewed-on: https://chromium-review.googlesource.com/c/1398398 Reviewed-by: Justin DeWitt <dewittj@chromium.org> Commit-Queue: Peter Wen <wnwen@chromium.org> Cr-Commit-Position: refs/heads/master@{#621143} [modify] https://crrev.com/3cffb80a89e4301ac35e65e3dfc7c4afc139bcd6/build/android/gradle/generate_gradle.py [modify] https://crrev.com/3cffb80a89e4301ac35e65e3dfc7c4afc139bcd6/build/android/gradle/manifest.jinja
,
Jan 9
Re-assigning to Justin as he's looking into how to make this flow better.
,
Jan 16
(6 days ago)
Andrew made a good suggestion, simply remove all of min/target lines from all our AndroidManifest.xml files and only have GN know about them, just like Android Studio wants only gradle to know about these settings. |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by bugdroid1@chromium.org
, May 10 2018