# This is the network config written by 'subiquity' network: ethernets: ens33: addresses: -192.168.222.100/24 nameservers: addresses: [114.114.114.114] routes: -to:default via:192.168.222.254 dhcp4:false version:2
配置生效
1 2 3 4 5
sudo netplan apply # 查看 ip ip addr show ens33 # 查看路由 ip route show
[Desktop Entry] Version=1.0 Type=Application Name=IntelliJ IDEA Icon=/home/maxzhao/develop/ideaIC-2024.2.0.2/bin/idea.png Exec=/home/maxzhao/develop/ideaIC-2024.2.0.2/bin/idea.sh Comment=IntelliJ IDEA Integrated Development Environment Categories=Development;IDE; Terminal=false
Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, v1.17.4, on Linux, locale zh_CN.UTF-8) [!] Android toolchain - develop for Android devices (Android SDK version 29.0.3) ! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses [!] Android Studio (not installed) [!] Connected device ! No devices available
! Doctor found issues in 3 categories.
如果设备为手机,在IDEA上也可以看到。
运行 flutter run 命令来运行应用程序:
1
flutter run
卡在Running Gradle task ‘assembleDebug’…
因为Gradle的Maven仓库是在国外, 我们可以使用阿里云的镜像地址~
修改 flutter 基础地址
1
vim /opt/flutter/packages/flutter_tools/gradle/flutter.gradle
验证当前用户是否存在,如果不存在,则抛出throw new UsernameNotFoundException("用户不存在");异常,直接到UsernamePasswordAuthenticationFilter.unsuccessfulAuthentication处理当前异常,可以自定义返回信息。