Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/233.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 应用程序没有';t在发布模式下构建_Android_Firebase_Flutter_Gradle_Release Mode - Fatal编程技术网

Android 应用程序没有';t在发布模式下构建

Android 应用程序没有';t在发布模式下构建,android,firebase,flutter,gradle,release-mode,Android,Firebase,Flutter,Gradle,Release Mode,我试图为我的应用程序构建一个realese签名的apk,但有两个错误。第一个是gradle抛出的,就像丢失了一些文件,第二个是firebase消息插件。我已经在build.gradle中将CompileSdkVersion设置为28!每次使用flatterbuildapk构建之前,我都会运行flatterclean——根据abi命令拆分。顺便说一下,应用程序包的构建没有问题。这是终端的输出 Running "flutter pub get" in lock_ui...

我试图为我的应用程序构建一个realese签名的apk,但有两个错误。第一个是gradle抛出的,就像丢失了一些文件,第二个是firebase消息插件。我已经在build.gradle中将CompileSdkVersion设置为28!每次使用
flatterbuildapk构建之前,我都会运行flatterclean——根据abi
命令拆分。顺便说一下,应用程序包的构建没有问题。这是终端的输出

Running "flutter pub get" in lock_ui...                             1,1s
Note: C:\Flutter\flutter\.pub-cache\hosted\pub.dartlang.org\android_intent-0.3.7+4\android\src\main\java\io\flutter\plugins\androidintent\MethodCallHand
lerImpl.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: C:\Flutter\flutter\.pub-cache\hosted\pub.dartlang.org\flutter_blue-0.7.2\android\src\main\java\com\pauldemarco\flutter_blue\FlutterBluePlugin.java
 uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\WheelKeep\lock_ui\build\flutter_blue\generated\source\proto\release\javalite\com\pauldemarco\flutter_blue\Protos.java uses unchecked or unsafe
operations.
Note: Recompile with -Xlint:unchecked for details.
Note: C:\Flutter\flutter\.pub-cache\hosted\pub.dartlang.org\flutter_secure_storage-3.3.4\android\src\main\java\com\it_nomads\fluttersecurestorage\cipher
s\RSACipher18Implementation.java uses or overrides 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.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':shared_preferences: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
     C:\Users\andri\.gradle\caches\transforms-2\files-2.1\3ae8acf77913112ba07cff775c9265b3\core-1.1.0\res\values\values.xml:142:5-173:25: AAPT: error: r
esource android:attr/fontVariationSettings not found.

     C:\Users\andri\.gradle\caches\transforms-2\files-2.1\3ae8acf77913112ba07cff775c9265b3\core-1.1.0\res\values\values.xml:142:5-173:25: AAPT: error: r
esource 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 1m 42s
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done                     103,6s
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 android_intent...
Running Gradle task 'assembleAarRelease'...
Running Gradle task 'assembleAarRelease'... Done                    2,4s
√ Built build\app\outputs\repo.
Building plugin firebase_core...
Running Gradle task 'assembleAarRelease'...
Running Gradle task 'assembleAarRelease'... Done                   74,0s


FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':javaPreCompileRelease'.
> Could not resolve all files for configuration ':releaseCompileClasspath'.
   > Could not find com.google.firebase:firebase-bom:25.3.1.
     Required by:
         project :
   > Could not find com.google.firebase:firebase-core:.
     Required by:
         project :
   > Could not find androidx.annotation:annotation:1.1.0.
     Required by:
         project :

* 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.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':generateReleaseRFile'.
> Could not resolve all files for configuration ':releaseRuntimeClasspath'.
   > Could not find com.google.firebase:firebase-bom:25.3.1.
     Searched in the following locations:
       - https://storage.googleapis.com/download.flutter.io/com/google/firebase/firebase-bom/25.3.1/firebase-bom-25.3.1.pom
       - https://storage.googleapis.com/download.flutter.io/com/google/firebase/firebase-bom/25.3.1/firebase-bom-25.3.1.jar
     Required by:
         project :
   > Could not find com.google.firebase:firebase-core:.
     Required by:
         project :
   > Could not find androidx.annotation:annotation:1.1.0.
     Searched in the following locations:
       - https://storage.googleapis.com/download.flutter.io/androidx/annotation/annotation/1.1.0/annotation-1.1.0.pom
       - https://storage.googleapis.com/download.flutter.io/androidx/annotation/annotation/1.1.0/annotation-1.1.0.jar
     Required by:
         project :

* 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 13s


The plugin firebase_core could not be built due to the issue above.

尝试使用较旧的Firebase库版本。我也有同样的问题,在我降级Firebase版本后,它消失了。

尝试使用较旧的Firebase库版本。我也有同样的问题,在我降级Firebase版本后,它就消失了。

您的pubspec.yaml中有共享首选项的最新版本吗?没有,我会更新,看看它是否有帮助W,它现在可以工作了!谢谢!你的pubspec.yaml中有最新版本的共享首选项吗?没有,我会更新,看看它是否有用。哇,现在可以了!谢谢!