我将捆绑包上传到 google play 并显示包含 android.permission.REQUEST_INSTALL_PACKAGES的权限
这是我的 AndroidManifest 文件内容:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.flutter.application">
<!-- The INTERNET permission is required for development. Specifically,
flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET"/>
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to …Run Code Online (Sandbox Code Playgroud) 我正在开发一个颤振 Web 项目并在 chrome 上运行它。每次我进行更改并按 时r,我都会看到以下几行:
Performing a hot restart...
(This is taking an unexpectedly long time.) -
Run Code Online (Sandbox Code Playgroud)
然后应用程序将完全冻结,热重启将永远持续下去。然后我需要刷新 chrome 浏览器以查看更改。刷新浏览器后,终端给了我以下信息:
Performing hot restart...
216,378ms (!)
Restarted application in 216,380ms.
Run Code Online (Sandbox Code Playgroud)
我正在使用 VS 代码。如果我通过 运行项目Run > Run Without Debugging,在文件保存时热重启,我仍然需要刷新浏览器。
我尝试通过在服务器上运行flutter run -d web-server,网页不再冻结,但仍需要刷新以显示更改。如果我使用flutter fun -d web-server --verbose.
[+6946 ms] Performing hot restart...
[ +61 ms] Scanned through 534 files in 59ms
[ +1 ms] Syncing files to device Web Server...
[ +1 ms] …Run Code Online (Sandbox Code Playgroud) 这是代码。代码:
class ThemeChangerWidget extends StatelessWidget {
final List<String> string = ['Light', 'Dark', 'Amoled'];
@override
Widget build(BuildContext context) {
final stateData = Provider.of<ThemeNotifier>(context);
final ThemeData state = stateData.getTheme();
return Theme(
data: state.copyWith(unselectedWidgetColor: state.accentColor),
child: AlertDialog(
backgroundColor: state.primaryColor,
shape:
RoundedRectangleBorder(borderRadius: BorderRadius.circular(8.0)),
title: Text('Select Theme', style: state.textTheme.body1),
content: ListView.builder(
shrinkWrap: true,
itemBuilder: (context, index) {
return RadioListTile(
value: index,
groupValue: themes.indexOf(state),
onChanged: (ind) {
onThemeChanged(ind, stateData);
},
title: Text(
string[index],
style: state.textTheme.body2,
),
);
},
itemCount: string.length,
)),
);
}
}'
Run Code Online (Sandbox Code Playgroud)
错误 - …