Comments (6)
这个是 Flutter 运行时产物,可以先在项目根目录用 flutter clean 清除,再用 flutter create . 或者直接运行 flutter run 跑一次就可以了
from flutter-notebook.
你好, 我试了 flutter clean 再 flutter run, 但是不行. AndroidManifest.xml 是 android 项目必须的文件, 它应该不是 flutter 运行时产物
from flutter-notebook.
我刚试了一下,提示说的比较清楚了:在项目目录下运行 flutter create .
from flutter-notebook.
非常感谢, 原来之前我忽略了 create 后面的 .
不过现在虽然自动创建了 AndroidManifest 文件, 不过却运行不起来, 报错如下:
D:\Code\github\flutter\Flutter-Notebook-master\mecury_project\example\animated_floating_action_bar\android\app\src\main\java\com\litavadaski\animatedfloatingactionbar\MainActivity.java:11: ����: �����ݵ�����: MainActivity��ת��ΪFlutterEngine
GeneratedPluginRegistrant.registerWith(this);
^
ע: ijЩ��Ϣ�Ѿ�����; ��ʹ�� -Xdiags:verbose ���±����Ի���������
1 ������
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 6s
Finished with error: Gradle task assembleDebug failed with exit code 1
使用 --stacktrace 查看错误如下
D:\Code\github\flutter\Flutter-Notebook-master\mecury_project\example\animated_floating_action_bar\android\app\src\main\java\com\litavadaski\animatedfloatingactionbar\MainActivity.java:11: 错误: 不
兼容的类型: MainActivity无法转换为FlutterEngine
GeneratedPluginRegistrant.registerWith(this);
我跟正常运行的项目中的 MainActivity 比对了一下, 发现代码是一模一样的, 这是哪里不对呢?烦请作者帮忙看下
from flutter-notebook.
MainActivity改成这样既可:
package com.litavadaski.provider_example;
import android.os.Bundle;
import io.flutter.embedding.android.FlutterActivity;
import io.flutter.embedding.engine.FlutterEngine;
import io.flutter.plugins.GeneratedPluginRegistrant;
public class MainActivity extends FlutterActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// GeneratedPluginRegistrant.registerWith(this);
}
@Override
public void configureFlutterEngine(FlutterEngine flutterEngine) {
GeneratedPluginRegistrant.registerWith(flutterEngine);
}
}
from flutter-notebook.
非常感谢!
from flutter-notebook.
Related Issues (20)
- nciecndyhencnhchenifgyyoutt6666yyyyyyyejdsa hd kla?d HOT 1
- Another exception was thrown: NoSuchMethodError: The getter 'bLoC' was called on null. HOT 5
- 能不能启动其他APP HOT 3
- DownGit怎么用 HOT 1
- flutter: Another exception was thrown: Bad state: Stream has already been listened to. HOT 6
- 沙发可以不
- 能否请教下,如何在cupertino的组件下实现一个类似material的tabbar... HOT 2
- Android studio跑步起来 HOT 2
- 写demo的时候blocprovider,的of返回值是null HOT 2
- 勘误:keep_alive_demo中build方法须调用super.build HOT 2
- slider_screen 项目中前景图片如何铺满屏幕,小白,求代码 HOT 5
- 导入AndroidStudio报错 HOT 4
- 工具目录有个文件,有问题,无法Checkout. HOT 1
- No Response Test HOT 5
- 在provider_example中,如何初始化状态数据? HOT 3
- 有關於dispose方法 HOT 1
- 聊天页面滚动到底部 HOT 2
- Your app isn't using AndroidX.
- 您的诸多demo都还不错,那希望出现启动页的demo HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter-notebook.