Recently, it is too late to update notes, I have to speed up my study, the code has been updated github, there are comments in the code, syntax API can be baidu self-extension.

Flutter code address

But some of the difficulties encountered, on the record, the follow-up problems will be updated in time

Flutter Android GradleException displays a red error resolution

By default, a Flutter project created by Android Studio will not explode. However, if I find the file according to the logo of my screenshots and open it (hand slingshot, [squint]), it will immediately explode. This will not affect the operation, but it will explode and must be destroyed.

Straight up: Look at the problem

Solution 1: the speed is very GIao kind

The solutions are as follows:

throw new GradleException(...)
Copy the code

replace

throw new Exception(...)
Copy the code

Method 2:

File>Project Structure (Command +;) > Under Project Settings/Project > Set Project SDK to Android API 29 Platform)

then

will

throw new GradleException(...)
Copy the code

replace

throw new FileNotFoundException(...)
Copy the code

Because the Java version of the Java API does not support 29! You should note that the Android API 29 platform is now visible under “External Libraries.

Pay attention to

If, Properties is also popular, adopt method two to solve