mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Generate an Android manifest in "flutter init"
This commit is contained in:
parent
abf3f1bb00
commit
76ced91388
@ -141,6 +141,7 @@ class FlutterSimpleTemplate extends Template {
|
||||
files['pubspec.yaml'] = _pubspec;
|
||||
files['README.md'] = _readme;
|
||||
files['lib/main.dart'] = _libMain;
|
||||
files['apk/AndroidManifest.xml'] = _apkManifest;
|
||||
}
|
||||
}
|
||||
|
||||
@ -221,3 +222,25 @@ class FlutterDemo extends StatelessComponent {
|
||||
}
|
||||
}
|
||||
''';
|
||||
|
||||
const String _apkManifest = r'''
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.{{projectName}}">
|
||||
|
||||
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="21" />
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
|
||||
<application android:name="org.domokit.sky.shell.SkyApplication" android:label="{{projectName}}">
|
||||
<activity android:name="org.domokit.sky.shell.SkyActivity"
|
||||
android:launchMode="singleTask"
|
||||
android:theme="@android:style/Theme.Black.NoTitleBar"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize"
|
||||
android:hardwareAccelerated="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
</manifest>
|
||||
''';
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user