Comments (11)
Hi, Krisna! That sounds like an error relating to Dart 2. You seem to still have an older version of Flutter and Dart that doesn't accept the new Dart 2 syntax. In Dart 2, you don't have to include new
in all your calls to the constructor.
Try a couple things.
First, try going to IntelliJ IDEA menu and clicking on Check for Updates. There is probably an update for IntelliJ and updates for the Dart and Flutter plugins.
If this is all up to date and you still have a problem, go to IntelliJ IDEA -> Preferences -> Languages & Frameworks -> Flutter and make sure "Run applications in Dart 2.0 mode" is set to "Enable Dart 2"
Write back if you still have problems.
from material-components-flutter-codelabs.
Hi @willlarche
Thanks for the response.
I've made it work on both iOS and Android simulator after updating the IntelliJ IDEA & enabling Dart 2.
But when I tried to run on a real device (Android 8.0.0 | using USB-C to USB-C 3.1), it keeps on the
Installing build/app/outputs/apk/app.apk
process.
from material-components-flutter-codelabs.
@krisnaw, did you set your Android device to developer mode?
from material-components-flutter-codelabs.
Hi @Sfshaza
Yes, I've set my device to developer mode.
- I tried making a simple app using
flutter create test-app
first and run it on my device. It works fine. - After that, I'm cloning the material design app and following the steps. Then it stuck on the
Installing build/app/outputs/apk/app.apk
process.
from material-components-flutter-codelabs.
In the first report, you say you're seeing error messages about "new"? Is that what's happening when you use the MDC code on your device? If that's the case, it sounds like a versioning issue.
from material-components-flutter-codelabs.
Hi @Sfshaza
The first issue is caused by outdated Flutter & Dart on my IntelliJ. And already fixed by following @willlarche suggestion. So it works fine when I run it on both iOS and Android simulltor, but stuck on Installing build/app/outputs/apk/app.apk
when I tried to run on real device.
from material-components-flutter-codelabs.
Updates
This is the error I getting after enable verbose mode when running the app on device
Error type 3
Error: Activity class {com.example.mdc100series/com.example.mdc100series.MainActivity} does not exist.
[ ] Waiting for observatory port to be available...
from material-components-flutter-codelabs.
I spoke with someone who knew about this stuff.
Docs on the Android manifest are at:
https://developer.android.com/guide/topics/manifest/manifest-intro
The error mentions the component name
"com.example.mdc100series/com.example.mdc100series.MainActivity". The
part of the component name before the slash is the application package
name, and after the slash is the activity class. Some checks to do:
- Does the manifest specify the package name "com.example.mdc100series"?
- Does the package include an activity named ".MainActivity"?
- Does the Java code in the APK include an activity class named
"com.example.mdc100series.MainActivity"?
from material-components-flutter-codelabs.
Hi @willlarche
Thanks for the responses
-
Does the manifest specify the package name? Yes
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.mdc100series">
-
Does the package include an activity name ".MainActivity"? Yes, there is a file named MainActivity
-
How do I check if the APK ?
from material-components-flutter-codelabs.
Hmm. I'm not expert enough in Android to answer that. I'd ask for more help in the Flutter chat room: https://gitter.im/flutter/flutter
from material-components-flutter-codelabs.
Going to close since it's an issue on using IDE. If you learn anything that's really useful for us to add to the setup instructions, report back.
from material-components-flutter-codelabs.
Related Issues (20)
- Invalid Flutter Documentation links HOT 2
- Android SDK and Kotlin versions not compatible with fresh install of Flutter HOT 2
- The vertical space for cards is a margin not a padding as it is referenced in the codelab MDC-102 Flutter: Material Structure and Layout HOT 1
- The link is broken HOT 1
- FlatButton and RaisedButton is deprecated. HOT 2
- Tutorial didn't metion icon themes HOT 1
- There's no constant named 'labelLarge' in 'TextOverflow'. HOT 1
- Update screenshots to match expectations HOT 3
- headline5 HOT 4
- Update Flutter Shrine Tutorials HOT 2
- Inaccurate explanation of the "onPressed" parameter HOT 1
- material-components-flutter-codelabs-101-starter HOT 1
- MDC-103 Flutter - step 7 adding features HOT 1
- MDC-101 Flutter: Material Components Basics >>> 5. Add buttons HOT 3
- MDC-101 Flutter:Material Components Basics - Add TextField widgets - Wrong height HOT 1
- MDC-104 Flutter:Material Advanced Components - Add a branded icon - Error HOT 2
- Issues Identified in MDC-103 Flutter: Material Theming with Color, Shape, Elevation, and Type
- difference between actual code and codelab code
- In the login.dart, there is a typo
- deprecated code exists HOT 3
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 material-components-flutter-codelabs.