-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listfound in release: 3.9Found to occur in 3.9Found to occur in 3.9good first issueRelatively approachable for first-time contributorsRelatively approachable for first-time contributorshas reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-androidAndroid applications specificallyAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versiont: gradle"flutter build" and "flutter run" on Android"flutter build" and "flutter run" on AndroidtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
Description
Steps to Reproduce
Make sure you're on the master channel.
flutter create example --platforms androidflutter build apk --config-onlycd android./gradlew :app:assembleDebug
Expected results:
A fresh, flutter created project should not have any Gradle warnings. This warning will become an error in future AGP versions.
Actual results:
I see a deprecation warning.
$ ./gradlew :app:assembleDebug
> Task :app:processDebugMainManifest
package="com.example.example_gradle" found in source AndroidManifest.xml: /Users/bartek/dev/bartekpacia/example_gradle/android/app/src/main/AndroidManifest.xml.
Setting the namespace via a source AndroidManifest.xml's package attribute is deprecated.
Please instead set the namespace (or testNamespace) in the module's build.gradle file, as described here: https://developer.android.com/studio/build/configure-app-module#set-namespace
This migration can be done automatically using the AGP Upgrade Assistant, please refer to https://developer.android.com/studio/build/agp-upgrade-assistant for more information.
> Task :app:stripDebugDebugSymbols
Unable to strip the following libraries, packaging them as they are: libflutter.so.
BUILD SUCCESSFUL in 14s
36 actionable tasks: 35 executed, 1 up-to-date
I think there are 2 action items:
- easy: change the template files to define
namespaceinbuild.gradle, and not inAndroidManifest. See Fix Gradle warning in a freshlyflutter createed Android project #122290 for an example. - harder: write a migration so all existing projects get this change. We can also tell developers to use AGP Upgrade Assistant in Android Studio.
Code sample
Logs
$ flutter doctor --verbose
[✓] Flutter (Channel master, 3.9.0-15.0.pre.15, on macOS 13.2.1 22D68 darwin-arm64, locale en-PL)
• Flutter version 3.9.0-15.0.pre.15 on channel master at /Users/bartek/fvm/versions/master
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 13fbd1948c (46 minutes ago), 2023-03-22 18:57:49 -0400
• Engine revision 02171d1f83
• Dart version 3.0.0 (build 3.0.0-356.0.dev)
• DevTools version 2.22.2
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
• Android SDK at /Users/bartek/androidsdk
• Platform android-33, build-tools 33.0.1
• ANDROID_HOME = /Users/bartek/androidsdk
• Java binary at: /Users/bartek/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/221.6008.13.2211.9619390/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14C18
• CocoaPods version 1.12.0
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2022.1)
• Android Studio at /Users/bartek/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/221.6008.13.2211.9619390/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
[✓] IntelliJ IDEA Ultimate Edition (version 2022.3.3)
• IntelliJ at /Users/bartek/Applications/JetBrains Toolbox/IntelliJ IDEA Ultimate.app
• Flutter plugin version 72.1.4
• Dart plugin version 223.8888
[✓] IntelliJ IDEA Ultimate Edition (version 2022.3.3)
• IntelliJ at /Users/bartek/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/223.8836.41/IntelliJ IDEA.app
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
[✓] VS Code (version 1.76.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.60.0
[✓] Connected device (3 available)
• sdk gphone64 arm64 (mobile) • emulator-5554 • android-arm64 • Android 13 (API 33) (emulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 13.2.1 22D68 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 111.0.5563.64
[✓] Network resources
• All expected network resources are available.
• No issues found!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listfound in release: 3.9Found to occur in 3.9Found to occur in 3.9good first issueRelatively approachable for first-time contributorsRelatively approachable for first-time contributorshas reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-androidAndroid applications specificallyAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versiont: gradle"flutter build" and "flutter run" on Android"flutter build" and "flutter run" on AndroidtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.