2

I get lot of errors when running command flutter run --release.

xxx@xxx-Inspiron-14-3467:~/Desktop/xxx$ flutter run --release
Multiple devices found:
SM A207F (mobile)                  • R9WMA0D0G7J   • android-arm64 • Android 10 (API 29)
Android SDK built for x86 (mobile) • emulator-5554 • android-x86   • Android 7.1.1 (API 25) (emulator)
[0]: SM A207F (R9WMA0D0G7J)
[1]: Android SDK built for x86 (emulator-5554)
Please choose one: [0|1]: 0

Launching lib/main.dart on SM A207F in release mode...
Running Gradle task 'assembleRelease'...                                
Note: Some input files use or override a deprecated API.        
Note: Recompile with -Xlint:deprecation for details.                                                               
Note: Some input files use unchecked or unsafe operations.                                                         
Note: Recompile with -Xlint:unchecked for details.                                                                 
Note: /home/xxx/Desktop/flutter_linux_1.20.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.5.2/android/src/main/java/io/flutter/plugins/urllauncher/WebViewActivity.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.                                                               
                                                                                                                   
FAILURE: Build failed with an exception.                                                                           
                                                                                                                   
* What went wrong:                                                                                                 
Execution failed for task ':connectivity:verifyReleaseResources'.                                                  
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade                  
   > 1 exception was raised by workers:                                                                            
     com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed                          
     /home/xxx/.gradle/caches/transforms-2/files-2.1/56399ec8cdc895aa561f5aa75e965d03/core-1.0.1/res/values/values.xml:57:5-88:25: AAPT: error: resource android:attr/fontVariationSettings not found.
                                                                                                                   
     /home/xxx/.gradle/caches/transforms-2/files-2.1/56399ec8cdc895aa561f5aa75e965d03/core-1.0.1/res/values/values.xml:57:5-88:25: AAPT: error: resource android:attr/ttcIndex not found.
                                                                                                                   
                                                                                                                   
                                                                                                                   
* 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 3m 22s                                                                                             
Running Gradle task 'assembleRelease'...                                                                           
Running Gradle task 'assembleRelease'... Done                     202.7s (!)
The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the
incompatibility.
Building plugin connectivity...
Running Gradle task 'assembleAarRelease'...                             
Running Gradle task 'assembleAarRelease'... Done                    2.0s


FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'connectivity'.
> SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.

* 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


Exception: The plugin connectivity could not be built due to the issue above.

flutter doctor -v

xxx@xxx:~/Desktop/xxx$ flutter doctor -v
[✓] Flutter (Channel stable, 1.20.2, on Linux, locale en_US.UTF-8)
    • Flutter version 1.20.2 at /home/xxx/Desktop/flutter_linux_1.20.2-stable/flutter
    • Framework revision bbfbf1770c (3 weeks ago), 2020-08-13 08:33:09 -0700
    • Engine revision 9d5b21729f
    • Dart version 2.9.1

 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /home/xxx/Android/Sdk
    • Platform android-29, build-tools 29.0.2
    • Java binary at: /opt/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✓] Android Studio (version 3.5)
    • Android Studio at /opt/android-studio
    • Flutter plugin version 41.0.2
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] VS Code (version 1.37.1)
    • VS Code at /usr/share/code
    • Flutter extension version 3.4.1

[✓] Connected device (2 available)
    • SM A207F (mobile)                  • R9WMA0D0G7J   • android-arm64 • Android 10 (API 29)
    • Android SDK built for x86 (mobile) • emulator-5554 • android-x86   • Android 7.1.1 (API 25) (emulator)

• No issues found!
John Joe
  • 12,412
  • 16
  • 70
  • 135
  • 2
    "error: resource android:attr/fontVariationSettings not found" -> https://stackoverflow.com/questions/49208772/error-resource-androidattr-fontvariationsettings-not-found - Errors often contain useful information on how to solve the problem, or at least show you what is wrong with it. – Caramiriel Sep 01 '20 at 09:12

1 Answers1

0
  • What went wrong: A problem occurred configuring root project 'connectivity'.

The issue is came from connectivity plugin. After I upgraded to the latest version, it able to run now.

John Joe
  • 12,412
  • 16
  • 70
  • 135