Remove unused flag --target-platform from flutter run#34369
Remove unused flag --target-platform from flutter run#34369blasten merged 2 commits intoflutter:masterfrom
--target-platform from flutter run#34369Conversation
373bed9 to
be78242
Compare
|
Does this mean I guess that's supposed to not work soon anyway, right? Or at least be strongly discouraged? And someone could just build the APK and manually install it. |
|
Correct. If they need to build an APK that doesn't match the device arch, they can always build it using |
* master: (24 commits) [flutter_tool,fuchsia] Update the install flow for packaging migration. (flutter#34447) SliverFillRemaining flag for different use cases (flutter#33627) SizedBox documentation (flutter#34424) Change API doc link to api.dart.dev (flutter#34388) 2589785 Roll src/third_party/skia 87e885038893..c3252a04b377 (3 commits) (flutter/engine#9327) (flutter#34484) ace5d59 Fix rawTypes errors in Android embedding classes (flutter/engine#9326) (flutter#34481) bf0def6 Roll src/third_party/skia 4c4945a25248..87e885038893 (1 commits) (flutter/engine#9325) (flutter#34471) Roll engine f1d821d..6f5347c (13 commits) (flutter#34466) Allow "from" hero state to survive hero animation in a push transition (flutter#32842) Roll pub dependencies (flutter#33677) Skip flaky test on Windows (flutter#34464) Allow flaky tests to pass or fail and mark web tests as flaky (flutter#34456) Dont depend on web SDK unless running tests on chrome (flutter#34457) Fix semantics_tester (flutter#34368) Include raw value in Diagnostics json for basic types (flutter#34417) Refactor Gradle plugin (flutter#34353) Allow web tests to fail in cirrus config (flutter#34436) skip bottom_sheet (flutter#34430) Remove unused flag `--target-platform` from `flutter run` (flutter#34369) Extract DiagnosticsNode serializer from WidgetInspector (flutter#34012) ...
|
So I have a situation, flutter cannot add libflutter.so to armeabi-v7a automatically when using studio without --target-platform=android-arm because it declared that my Phone is x64, but some libraries don't supply arm64 so files, so without --target-platform=android-arm, arm64 only have libflutter.so, app crash. |
|
cc @blasten |
|
@ymback Just to confirm, are you using 3P libraries that don’t provide an arm64 equivalent? |
|
Yes, 3P libraries only provice armeabi-v7a. |
|
I think the gradle.dart file should check if it's from flutter run, and use different plan to generate target-platform. |
|
If you need to build a 32-bit binary and run it on a 64-bit device, then try using the |
Thouth I don't think it's a good solution cause I have to run in command first, but it's useful enough, thank you, I'll do like this. |
|
remove --target-platform flag makes debug in vscode very inconvenient while with 32-bit 3P lib. |
|
the same situation
|
|
1、edit the flutter/packages/flutter_tools/lib/src/android/gradle.dart file and set -Ptarget-platform=android-arm Then your Android studio can run armeabi-v7a apk on the 64-bit developing device. |
|
remove --target-platform flag makes debug very inconvenient while with 32-bit 3P lib. |
|
Plz restore this flag. |


Description
The target platform is inferred from the device or simulator, so the
--target-platformdoesn't change anything.Tests
I added the following tests:
n/a
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Does your PR require Flutter developers to manually update their apps to accommodate your change?