Code Monkey home page Code Monkey logo

mi_card_flutter's Introduction

App Brewery Banner

Mi Card

Our Goal

Now that you've seen how to create a Flutter app entirely from scratch, we're going to go further and learn more about how to design user interfaces for Flutter apps.

What you will create

Mi Card is a personal business card. Imagine every time you wanted to give someone your contact details or your business card but you didn't have it on you. Well, now you can get them to download your business card as an app.

What you will learn

  • How to create Stateless Widgets
  • What is the difference between hot reload and hot refresh and running an app from cold
  • How to use Containers to lay out your UI
  • How to use Columns and Rows to position your UI elements
  • How to add custom fonts
  • How to add Material icons
  • How to style Text widgets
  • How to read and use Flutter Documentation

This is a companion project to The App Brewery's Complete Flutter Development Bootcamp, check out the full course at www.appbrewery.co

End Banner

mi_card_flutter's People

Contributors

themuellenator avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mi_card_flutter's Issues

Problems with cloning

Hi, I'm following the udemy course and have problems cloning this.
I can download and extract, but the process of cloning itself is causing an error and I'm curious what the issue is, to solve this for the future.
This is the error:
Image of Error

Gradle Build Fail

After Cloning down the repo, trying to run gives me this error

Launching lib\main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...

FAILURE: Build failed with an exception.

* What went wrong:
Could not initialize class org.codehaus.groovy.runtime.InvokerHelper

* 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 0s
Exception: Gradle task assembleDebug failed with exit code 1

Exception in thread "main" java.util.zip.ZipException:

Hi,
i'm on windows/intellij

the error shows up when i try to launch the app (after pub get is successfull).

Launching lib\main.dart on SM J330FN in debug mode... Running Gradle task 'assembleDebug'... Exception in thread "main" java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.<init>(ZipFile.java:225) at java.util.zip.ZipFile.<init>(ZipFile.java:155) at java.util.zip.ZipFile.<init>(ZipFile.java:169) at org.gradle.wrapper.Install.unzip(Install.java:214) at org.gradle.wrapper.Install.access$600(Install.java:27) at org.gradle.wrapper.Install$1.call(Install.java:74) at org.gradle.wrapper.Install$1.call(Install.java:48) at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65) at org.gradle.wrapper.Install.createDist(Install.java:48) at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:128) at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61) [!] Gradle threw an error while downloading artifacts from the network. Retrying to download... Running Gradle task 'assembleDebug'... Exception in thread "main" java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.<init>(ZipFile.java:225) at java.util.zip.ZipFile.<init>(ZipFile.java:155) at java.util.zip.ZipFile.<init>(ZipFile.java:169) at org.gradle.wrapper.Install.unzip(Install.java:214) at org.gradle.wrapper.Install.access$600(Install.java:27) at org.gradle.wrapper.Install$1.call(Install.java:74) at org.gradle.wrapper.Install$1.call(Install.java:48) at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65) at org.gradle.wrapper.Install.createDist(Install.java:48) at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:128) at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61) [!] Gradle threw an error while downloading artifacts from the network. Retrying to download... Exception: Gradle task assembleDebug failed with exit code 1

Getting error when running the mi_card_flutter code.

Screenshot (1)

I'm getting the following error.

Launching lib\main.dart on AOSP on IA Emulator in debug mode...
[!] Your app isn't using AndroidX.
To avoid potential build failures, you can quickly migrate your app by following the steps on https://goo.gl/CP92wY.
Running Gradle task 'assembleDebug'...

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:processDebugResources'.

Android resource linking failed
Output: C:\Users\hayya\AndroidStudioProjects\mi_card_flutter\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:186: error: resource android:attr/fontVariationSettings not found.
C:\Users\hayya\AndroidStudioProjects\mi_card_flutter\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:187: error: resource android:attr/ttcIndex not found.
error: failed linking references.

Command: C:\Users\hayya.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\8795c7c7149d9230db0423e079c95a4d\aapt2-3.2.1-4818971-windows\aapt2.exe link -I
C:\Users\hayya\AppData\Local\Android\sdk\platforms\android-27\android.jar
--manifest
C:\Users\hayya\AndroidStudioProjects\mi_card_flutter\build\app\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml
-o
C:\Users\hayya\AndroidStudioProjects\mi_card_flutter\build\app\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_
-R
@C:\Users\hayya\AndroidStudioProjects\mi_card_flutter\build\app\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt
--auto-add-overlay
--java
C:\Users\hayya\AndroidStudioProjects\mi_card_flutter\build\app\generated\not_namespaced_r_class_sources\debug\processDebugResources\r
--custom-package
co.appbrewery.micard
-0
apk
--output-text-symbols
C:\Users\hayya\AndroidStudioProjects\mi_card_flutter\build\app\intermediates\symbols\debug\R.txt
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
Output: C:\Users\hayya.gradle\caches\transforms-1\files-1.1\support-compat-28.0.0.aar\8785b1333ccfee40180d9ac1d1a63e1a\res\values\values.xml:89:5-125:25: AAPT: error: resource android:attr/fontVariationSettings not found.

C:\Users\hayya.gradle\caches\transforms-1\files-1.1\support-compat-28.0.0.aar\8785b1333ccfee40180d9ac1d1a63e1a\res\values\values.xml:89:5-125:25: AAPT: error: resource android:attr/ttcIndex not found.

error: failed linking references.
Command: C:\Users\hayya.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\8795c7c7149d9230db0423e079c95a4d\aapt2-3.2.1-4818971-windows\aapt2.exe link -I
C:\Users\hayya\AppData\Local\Android\sdk\platforms\android-27\android.jar
--manifest
C:\Users\hayya\AndroidStudioProjects\mi_card_flutter\build\app\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml
-o
C:\Users\hayya\AndroidStudioProjects\mi_card_flutter\build\app\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_
-R
@C:\Users\hayya\AndroidStudioProjects\mi_card_flutter\build\app\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt
--auto-add-overlay
--java
C:\Users\hayya\AndroidStudioProjects\mi_card_flutter\build\app\generated\not_namespaced_r_class_sources\debug\processDebugResources\r
--custom-package
co.appbrewery.micard
-0
apk
--output-text-symbols
C:\Users\hayya\AndroidStudioProjects\mi_card_flutter\build\app\intermediates\symbols\debug\R.txt
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0

  • 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 1s
Finished with error: Gradle task assembleDebug failed with exit code 1

flutter pub get instead of pub get

Because mi_card depends on flutter_test any from sdk which doesn't exist (the Flutter SDK is not available), version solving failed.

Flutter users should run flutter pub get instead of pub get.

FAILURE: Build failed with an exception. * Where: Build file 'C:\Users\Jungle-G\StudioProjects\mi_card_flutter\android\build.gradle' line: 20 * What went wrong: A problem occurred evaluating root project 'android'. > Plugin with id 'com.android.application' not found.

  1. def flutterVersionName = localProperties.getProperty('flutter.versionName')
  2. if (flutterVersionName == null) {
  3. flutterVersionName = '1.0'
  4. }
  5. apply plugin: 'com.android.application'
    apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 29
compileSdkVersion 31

can not run mi_card downloaded from here, doesn't work. Need help

Hi, after downloading mi_card from link provided in the course, when trying to run it getting this message:

Launching lib\main.dart on AOSP on IA Emulator in debug mode...
Running Gradle task 'assembleDebug'...

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:checkDebugAarMetadata'.

A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
One or more issues found when checking AAR metadata values:

 The minCompileSdk (31) specified in a
 dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
 is greater than this module's compileSdkVersion (android-30).
 Dependency: androidx.window:window-java:1.0.0-beta04.
 AAR metadata file: C:\Users\lulu\.gradle\caches\transforms-3\41a83d0cf61e3d2ab42ea706b65148ab\transformed\jetified-window-java-1.0.0-beta04\META-INF\com\android\build\gradle\aar-metadata.properties.

 The minCompileSdk (31) specified in a
 dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
 is greater than this module's compileSdkVersion (android-30).
 Dependency: androidx.window:window:1.0.0-beta04.
 AAR metadata file: C:\Users\lulu\.gradle\caches\transforms-3\bb9a53f8c4dc071c681fa071739dc70b\transformed\jetified-window-1.0.0-beta04\META-INF\com\android\build\gradle\aar-metadata.properties.
  • 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 1m 9s
Exception: Gradle task assembleDebug failed with exit code 1

DART SDK is not configured

I followed the steps provided by app brewery. But I get this message as soon as I launch the fluuter project in android studio
IMG_20200326_224250820

SOLVED: Dependancy issue with Dart 3 and higher

For those who are now starting this project, there are some changed you have to do to your YAML file for the dependencies to resolve.

change cupertino_icons to

cupertino_icons: ^1.0.6

and change sdk to

sdk: ">=2.12.0 <4.0.0"

make sure spacing is correct for each.

This updates the package manager to get the latest changes for Mi Card to work

SOLVED: Gradle Issue

Open android > gradle > gradle-wrapper.properties
change --> distributionUrl=https://services.gradle.org/distributions/gradle-7.0.2-all.zip
to --> distributionUrl=https://services.gradle.org/distributions/gradle-7.6-all.zip

Open android > app > build.gradle and then change both compileSdkVersion and targetSdkVersion to 31

Then open android > app > src > main > AndroidManifest.xml . Under the activity tag add android:exported="true" at the end.

Re-run you app and it should work

problem with cloning

App throws up issues after cloning. Issues ranging from assembleDebug fail and so on.

Error - Mi_Card_Flutter

after cloning the project from this repo into my local machine i was unable to run it in an emulator, whenever i try to run it i get this error.

  • The name of a constructor must match the name of the enclosing class.
  • Expected an identifier.

Solution for Initial Clone

I was also having cloning problems Initially and was getting this error.
My Setup - Windows 10, Android Studio Version

Error - The minCompileSdk (31) specified in a dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) is greater than this module's compileSdkVersion (android-29).

I could have created a new PR but I think the new commit was made for MacOS users specifically

Solution - Checkout your project to the initial commit and create a new branch.
Command - git checkout -b new_branch b7f3aa688bf398829a4de914273d3162b300cb4c

Try Building the project again. It should work now

unable to load images

No matter what I've tried with the mi_card_flutter it will not load images either if its a network image. Every time I run it comes up with a whole list of excepts that are pointing to the assets_build.dart
There is no faults in the yaml file and I have looked at everything in stack over flow and tried everything that has been advised but still fails to load and still brings up the assets_build.dart.
Can someone please help me as I'm at the point of pulling my hair out

IPHONEOS_DEPLOYMENT_TARGET

What you'd expect if these materials aren't updated in face of changes like iOS 14. IPHONEOS_DEPLOYMENT_TARGET is set to 8.0, which leads xcode to throw errors when trying to build.

Gradle task assembleDebug failed with exit code 1

  • What went wrong:
    A problem occurred evaluating project ':app'.

Failed to apply plugin 'com.android.internal.application'.
Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
You can try some of the following options:
- changing the IDE settings.
- changing the JAVA_HOME environment variable.
- changing org.gradle.java.home in gradle.properties.

  • 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

Gradle does not have execution permission

Hi
once starting emulator I got:
Launching lib/main.dart on Android SDK built for x86 in debug mode... [!] Your app isn't using AndroidX. To avoid potential build failures, you can quickly migrate your app by following the steps on https://goo.gl/CP92wY. Running Gradle task 'assembleDebug'... [!] Gradle does not have execution permission. You should change the ownership of the project directory to your user, or move the project to a directory with execute permissions. Finished with error: Gradle task assembleDebug failed with exit code 1
Any fixing?

unable to Pub get or Pub upgrade in flutter and the project doesnt run

@angelabauer angelabauer would you please help me
hi I started to import a project from github with the link below with your tutorial.

https://github.com/londonappbrewery/mi_card_flutter

==============

then I set dependencies and it warns me that the 'pub get' has not been run and when I click Get dependencies or Upgrade dependencies nothing changes and when I wannat test it on emulator it sends me this error:

Exception in thread "main" java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 403 Request blocked by Privoxy" at sun.net.www.protocol.http.HttpURLConnection.doTunneling(HttpURLConnection.java:2142) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:183) at sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2729) at sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2641) at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1824) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:263) at org.gradle.wrapper.Download.downloadInternal(Download.java:58) at org.gradle.wrapper.Download.download(Download.java:44) at org.gradle.wrapper.Install$1.call(Install.java:61) at org.gradle.wrapper.Install$1.call(Install.java:48) at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65) at org.gradle.wrapper.Install.createDist(Install.java:48) at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:128) at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61) [!] Gradle threw an error while trying to update itself. Retrying the update... Running Gradle task 'assembleDebug'... Exception in thread "main" java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 403 Request blocked by Privoxy" at sun.net.www.protocol.http.HttpURLConnection.doTunneling(HttpURLConnection.java:2142) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:183) at sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2729) at sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2641) at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1824) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:263) at org.gradle.wrapper.Download.downloadInternal(Download.java:58) at org.gradle.wrapper.Download.download(Download.java:44) at org.gradle.wrapper.Install$1.call(Install.java:61) at org.gradle.wrapper.Install$1.call(Install.java:48) at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65) at org.gradle.wrapper.Install.createDist(Install.java:48) at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:128) at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61) [!] Gradle threw an error while trying to update itself. Retrying the update... Finished with error: Gradle task assembleDebug failed with exit code 1

Gradle task assembleDebug failed with exit code 1

The following is the error:

Android resource linking failed
Output: G:\FLUTTER_PROJECTS\downloaded\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:186: error: resource android:attr/fontVariationSettings not found.
G:\FLUTTER_PROJECTS\downloaded\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:187: error: resource android:attr/ttcIndex not found.
error: failed linking references.

Command: C:\Users\dell.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\569201ef15a0fc6c5b515a5d722c0da7\aapt2-3.2.1-4818971-windows\aapt2.exe link -I
C:\Users\dell\AppData\Local\Android\sdk\platforms\android-27\android.jar
--manifest
G:\FLUTTER_PROJECTS\downloaded\build\app\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml
-o
G:\FLUTTER_PROJECTS\downloaded\build\app\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_
-R
@g:\FLUTTER_PROJECTS\downloaded\build\app\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt
--auto-add-overlay
--java
G:\FLUTTER_PROJECTS\downloaded\build\app\generated\not_namespaced_r_class_sources\debug\processDebugResources\r
--custom-package
co.appbrewery.micard
-0
apk
--output-text-symbols
G:\FLUTTER_PROJECTS\downloaded\build\app\intermediates\symbols\debug\R.txt
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
Output: C:\Users\dell.gradle\caches\transforms-1\files-1.1\support-compat-28.0.0.aar\532176a0f783afb7cffda780024ab855\res\values\values.xml:89:5-125:25: AAPT: error: resource android:attr/fontVariationSettings not found.

Solution to Cloning problems!

It seems a lot of people are having issues cloning the mi_card project, and later projects too.
I have hopefully found a way to resolve this:

Problems getting projects to open up from Version Control? Files seem to be missing? The code looks different to the tutorial when you open the project up after cloning? Try this!

  1. Open the cloned project in Android Studio.
  2. Now find the cloned files in a separate documents window (not in Android Studio).
  3. Within the documentation, find a file in here called 'main.dart' (probably in the folder named lib).
  4. Drag and drop the main.dart file into the space on Android Studio where you write the code. This should bring up the code as it appears in the tutorial.
  5. It may now say that Dart SDK is not configured. If it does, in Android Studio go to File>Settings>Languages & Frameworks>Dart.
  6. Click on the box 'Enable Dart support for the project ….........'
  7. You will need to input the Dart SDK path. This is probably: C:\src\flutter\flutter\bin\cache\dart-sdk
  8. If the above path suggestion doesn't work, open up a different, working Flutter project in Android studio. Find the correct path within this project - File>Settings>Languages & Frameworks>Dart.
  9. Copy and paste the path from this working project into the project you are trying to get to work.
  10. Then click the boxes 'Enable Dart Support for the following modules.
  11. Click 'OK'
  12. It should now work.
  13. Remember to now click 'Get Dependencies' at top of the screen

I really do help this solves your issues Flutterers! Please do reply if the solution worked for you.

Thanks,
Alex

Android build fails

Hello, was just onboarding with the app brewery course Intro to Flutter development and following along except I'm using VS Code and beta version of flutter.

My android build fails, any clue why?

mandric in ~/dev/scratch/mi_card_flutter (master=)
$ flutter run
Using hardware rendering with device Android SDK built for x86. If you get graphics artifacts, consider enabling software rendering with
"--enable-software-rendering".
Launching lib/main.dart on Android SDK built for x86 in debug mode...
/Users/mandric/dev/scratch/mi_card_flutter/android/app/src/debug/AndroidManifest.xml Error:
        Overlay manifest:package attribute declared at AndroidManifest.xml:2:5-44 value=(co.appbrewery.mi_card_flutter)
        has a different value=(co.appbrewery.micard) declared in main manifest at AndroidManifest.xml:2:5-35
        Suggestion: remove the overlay declaration at AndroidManifest.xml       and place it in the build.gradle:
                flavorName {                                            
                        applicationId = "co.appbrewery.mi_card_flutter" 
                }                                                       
                                                                        
FAILURE: Build failed with an exception.                                
                                                                        
* What went wrong:                                                      
Execution failed for task ':app:processDebugManifest'.                  
> Manifest merger failed : Overlay manifest:package attribute declared at AndroidManifest.xml:2:5-44 value=(co.appbrewery.mi_card_flutter)
        has a different value=(co.appbrewery.micard) declared in main manifest at AndroidManifest.xml:2:5-35
        Suggestion: remove the overlay declaration at AndroidManifest.xml       and place it in the build.gradle:
                flavorName {                                            
                        applicationId = "co.appbrewery.mi_card_flutter" 
                }                                                       
                                                                        
* 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 43s                                                     
Running Gradle task 'assembleDebug'...                                  
Running Gradle task 'assembleDebug'... Done                        44.4s
Exception: Gradle task assembleDebug failed with exit code 1

mandric in ~/dev/scratch/mi_card_flutter (master *=)
$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v1.17.0-3.2.pre, on Mac OS X 10.15.4 19E287, locale en-US)
 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.4.1)
[✓] Chrome - develop for the web
[!] Android Studio (version 3.5)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.44.2)
[✓] Connected device (3 available)

! Doctor found issues in 1 category.

Cloning Issue

Hey guys.
So I have been following the tutorial for the mi_card and having issues after cloning.
The folder is saved on my computer but a lot of folders are missing and I keep getting the "File not found: git.exe" error.
Please help.

lala

Upgrade Android embedding version

/Users/sarit/flutter/bin/flutter --no-color pub get
Running "flutter pub get" in mi_card_flutter...                  1,701ms
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Warning
──────────────────────────────────────────────────────────────────────────────
Your Flutter application is created using an older version of the Android
embedding. It's being deprecated in favor of Android embedding v2. Follow the
steps at

https://flutter.dev/go/android-project-migration

to migrate your project.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

This app is using a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to migrate this app to the V2 embedding.
Take a look at the docs for migrating an app: https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects
Process finished with exit code 0

AndroidX Update

Wasn't able to get program to work on virtual android device. Tracked the problem down to needing to update project to work with AndroidX.

*To get these working as is, I had to open the internal project's "android" file up as an existing project (not the mi_card_flutter file). Go into build.gradle and change compileSdkVersion to at least "28", then in Android Studio menu Refactor -> AndroidX and update any thing else that pops up.

After doing this the project would work, so these projects should probably be updated at their root.

Your project's Gradle version is incompatible with the Java version that Flutter is using │ │ for Gradle.

Build failed with an exception.

  • What went wrong:
    Could not open settings generic class cache for settings file 'C:\Users\vijet\StudioProjects\mi_card_flutter\android\settings.gradle' (C:\Users\vijet.gradle\caches\7.0.2\scripts\9ro1u0k9hdyieqwldgdt37f3r).

BUG! exception in phase 'semantic analysis' in source unit 'BuildScript' Unsupported class file major version 61

  • 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 1s

┌─ Flutter Fix ────────────────────────────────────────────────────────────────────────────────────┐
│ [!] Your project's Gradle version is incompatible with the Java version that Flutter is using │
│ for Gradle. │
│ │
│ To fix this issue, consult the migration guide at docs.flutter.dev/go/android-java-gradle-error. │
└──────────────────────────────────────────────────────────────────────────────────────────────────┘
Exception: Gradle task assembleDebug failed with exit code 1

Cannot resolve dependencies

The lower bound of "sdk: '>=2.1.0 <3.0.0'" must be 2.12.0'
or higher to enable null safety.

The current Dart SDK (3.1.0) only supports null safety.

Cloned ok, but missing many files.

I cloned mi_card_flutter to my computer, but it won't compile. Tried to install and upgrade the dependencies also not worked for me.

Comparing cloned(left) and created a new flutter project(right), it seems there are many files missing on this git repository.

1

Stonez56

Build Error with gradle

This error is showing .please help!!!!
Launching lib\main.dart on ONEPLUS A6000 in debug mode... Running Gradle task 'assembleDebug'... Exception in thread "main" java.lang.NullPointerException at org.gradle.wrapper.BootstrapMainStarter.findLauncherJar(BootstrapMainStarter.java:34) at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:25) at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129) at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61) Exception: Gradle task assembleDebug failed with exit code 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.