Skip to content

Commit

Permalink
fix: 🐛 Fix Android build failed issue
Browse files Browse the repository at this point in the history
  • Loading branch information
BbsonLin committed Dec 3, 2019
1 parent dd8838b commit 2ae93ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
FlutterApplication and put your custom class here. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
Expand Down
3 changes: 3 additions & 0 deletions example/android/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<resources>
<string name="app_name">serial_port_flutter_example</string>
</resources>

2 comments on commit 2ae93ef

@xbadal
Copy link

@xbadal xbadal commented on 2ae93ef Oct 8, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just add tools:replace="android:label" in Manifest.xml file

like

<application android:name="io.flutter.app.FlutterApplication" android:label="app_name" tools:replace="android:label" android:icon="@mipmap/ic_launcher"></<application>

@magnussp
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also needed to add xmlns:tools="http://schemas.android.com/tools" to the <manifest> tag to get it to work. otherwise it would refuse the tools:replace tag as a valid tag.

Please sign in to comment.