Explore the dynamic world of AI and its applications through our blog. Discover trending topics like machine learning, computer vision, AI in healthcare and finance, NLP, robotics, and more. Stay informed about the latest AI advancements and ethical considerations.
15 August, 2021
How to fix Kubernetes CrashLoopBackOff
02 August, 2021
Angular 10: Can't bind to 'ngIf' since it isn't a known property of 'div'
Error: Angular 10: Can't bind to 'ngIf' since it isn't a known property of 'div'
or
can't bind to 'ngif' since it isn't a known property of 'ng-container' angular 11
Solutions:
Make sure to import CommonModule from the module that is providing your component. for me I had to import CommonMudel in the TestComponent
BrowserModule vs CommonModule
BrowserModule provides services that are essential to launch and run a browser app.
BrowserModule also re-exports CommonModule from @angular/common, which means that components in the AppModule module also have access to the Angular directives every app needs, such as NgIf and NgFor.
CommonModule (all the basics of Angular templating: bindings, *ngIf, *ngFor…), except in the first app module, because it’s already part of the BrowserModule
09 March, 2021
Flutter: How to fix “unexpected element found in ” error?
All of a sudden, I am started getting this build error in my Android project:
Error: unexpected element <queries> found in <manifest>
Understanding the Issue:
To understanding why this happens see the above @CommonsWare's answer
This is because <queries> tag was introduced with new package visibility options for Android 11 and upwards (SDK 30+). Because of that, you need to update your build.gradle with a version that includes this changes. Below is a list of supported gradle options.
The best solution to deal with these errors is to Upgrade your Android Gradle plugin and Update Gradle
You’ll have to update your Gradle version to one of the compatible versions that have the latest query tags (which were introduced with Android 11).
How to Fix it?
To Update the Android Gradle plugin
Specify the plugin version in the YourAppDirectory/android/build.gradle file. The plugin version applies to all modules built-in that Android Studio project. The following example sets the plugin to version 4.0.1:
Gradle downloads it the next time you build your project
To Update Gradle
Specify the Gradle version by editing the Gradle distribution reference in the YourAppDirectory/android/gradle/wrapper/gradle-wrapper.properties file.
Don't forget to update your ditributionUrl in your gradle-wrapper.properties as well. For example, for gradle 4.0.1, you should have:
Flutter: mobX store code generate not working
mobX store code generate not working
I had a same issue and I was able to solve with following steps.
I had this problem today and put these versions and it worked, in case anyone needs
You need to follow just couple of steps. Here is my pubspec.yaml package version for the mobx
Step 1:
- Flutter (Channel stable, 1.22.6)
- mobx: ^1.2.1+2
- build_runner: 1.10.1
- mobx_codegen: ^1.1.0+1
Step 2: run following commands
- flutter clean
- flutter pub get
- flutter packages upgrade
- flutter pub run build_runner watch --delete-conflicting-outputs
04 March, 2021
How to downgrade flutter?
How to downgrade flutter?
Git Hub Source Code:
Using Flutter Channel:
Flutter Downgrade Command:
13 January, 2021
Angular: Cannot Get /
I was facing this issue, while visiting http://localhost:4200 **'.
Then, when I opened up a web browser, I navigated to localhost:4200 and a web page with the following text were shown:
Error: Cannot Get /
Solutions: This is related to most of time is incorrect syntax
Step 1: open terminal and run "ng build"
Step 2: See the command output and you must find some syntax issue related to your code. Go ahead and fix your issue that problem will be gone
22 December, 2020
Flutter Commands List
Command to check flutter version:
D:\>flutter --version
Output:
Flutter 1.20.4 • channel unknown • unknown source
Framework • revision fba99f6cf9 (3 months ago) • 2020-09-14 15:32:52 -0700
Engine • revision d1bc06f032
Tools • Dart 2.9.2
To generate an app bundle, run:
flutter build appbundle --target-platform android-arm,android-arm64,android-x64
To split the APKs per ABI, run:
flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi
Resolve Conflicts:
Here is some useful command List: run flutter help <command> to get command related information
|
Command Name |
Example |
Comments |
|
analyze |
flutter analyze
-d <DEVICE_ID> |
Analyzes the
project’s Dart source code. |
|
assemble |
flutter assemble
-o <DIRECTORY> |
Assemble and
build flutter resources. |
|
attach |
flutter attach -d
<DEVICE_ID> |
Attach to a
running application. |
|
bash-completion |
flutter
bash-completion |
Output command
line shell completion setup scripts. |
|
build |
flutter build
<DIRECTORY> |
Flutter build
commands. |
|
channel |
flutter channel
<CHANNEL_NAME> |
List or switch
flutter channels. |
|
config |
flutter config
--build-dir=<DIRECTORY> |
Configure Flutter
settings. To remove a setting, configure it to an empty string. |
|
create |
flutter create
<DIRECTORY> |
Creates a new
project. |
|
devices |
flutter devices
-d <DEVICE_ID> |
List all
connected devices. |
|
doctor |
flutter doctor |
Show information
about the installed tooling. |
|
downgrade |
flutter downgrade |
Downgrade Flutter
to the last active version for the current channel. |
|
drive |
flutter drive |
Runs Flutter
Driver tests for the current project. |
|
emulators |
flutter emulators |
List, launch and
create emulators. |
|
format |
flutter format
<DART_FILE> |
Format one or
more dart files. |
|
gen-l10n |
flutter gen-l10n
<DIRECTORY> |
Generate
localizations for the Flutter project. |
|
install |
flutter install
-d <DEVICE_ID> |
Install a Flutter
app on an attached device. |
|
logs |
flutter logs |
Show log output
for running Flutter apps. |
|
format |
flutter format
<DIRECTORY|DART_FILE> |
Formats Flutter
source code. |
|
precache |
flutter precache
<ARGUMENTS> |
Populates the
Flutter tool’s cache of binary artifacts. |
|
pub |
flutter pub
<PUB_COMMAND> |
Works with
packages. |
|
run |
flutter run
<DART_FILE> |
Runs a Flutter
program. |
|
symbolize |
flutter symbolize
--input=<STACK_TRACK_FILE> |
Symbolize a stack
trace from the AOT compiled flutter application. |
|
test |
flutter test
[<DIRECTORY|DART_FILE>] |
Runs tests in
this package. |
|
upgrade |
flutter upgrade |
Upgrade your copy
of Flutter. |