打包apk时出现Flutter错误,如何解决?

时间:2019-04-30 06:45:37

标签: flutter

打包apk时出现Flutter错误,如何解决?

在我的项目中,使用esysfluttershare插件包在iOS和Android平台上调用系统共享功能。当我使用flutter build apk时,出现错误。怎么解决呢?如果您不能解决问题,是否有其他方法或其他第三方库来调用系统共享功能?

以下是控制台打印

LJM:flu_app_fe vinbeeluo$ flutter build apk
Initializing gradle...                                              4.6s
Resolving dependencies...                                          10.6s
注: /Library/flutter/.pub-cache/hosted/pub.flutter-io.cn/esys_flutter_share-1.0.1/android/src/main/java/de/esys/esysfluttershare/EsysFlutterSharePlugin.ava使用了未经检查或不安全的操作。
注: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。                    
Calling mockable JAR artifact transform to create file: /Users/vinbeeluo/.gradle/caches/transforms-1/files-1.1/android.jar/e2dc5fd512a35e23c34d1e209fd43d11/android.jar with input /Users/vinbeeluo/Library/Android/sdk/platforms/android-28/android.jar
Calling mockable JAR artifact transform to create file: /Users/vinbeeluo/.gradle/caches/transforms-1/files-1.1/android.jar/90bc6d07db5b53f4236cf7be92d2f0d0/android.jar with input /Users/vinbeeluo/Library/Android/sdk/platforms/android-27/android.jar

FAILURE: Build failed with an exception.                                

* What went wrong:                                                      
Execution failed for task ':fluttertoast:verifyReleaseResources'.       
> java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
  /Users/vinbeeluo/Desktop/Git/flu_app_fe/build/fluttertoast/intermediates/res/merged/release/values-v28/values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.
  /Users/vinbeeluo/Desktop/Git/flu_app_fe/build/fluttertoast/intermediates/res/merged/release/values-v28/values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found.
  /Users/vinbeeluo/Desktop/Git/flu_app_fe/build/fluttertoast/intermediates/res/merged/release/values/values.xml:2601: error: resource android:attr/fontVariationSettings not found.
  /Users/vinbeeluo/Desktop/Git/flu_app_fe/build/fluttertoast/intermediates/res/merged/release/values/values.xml:2602: error: resource android:attr/ttcIndex not found.
  error: failed linking references.                                     


* 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 18s                                                  
Running Gradle task 'assembleRelease'...                                
Running Gradle task 'assembleRelease'... Done                      79.3s
Gradle task assembleRelease failed with exit code 1
LJM:flu_app_fe vinbeeluo$ 

0 个答案:

没有答案