質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Flutter

Flutterは、iOSとAndroidのアプリを同じコードで開発するためのフレームワークです。オープンソースで開発言語はDart。双方のプラットフォームにおける高度な実行パフォーマンスと開発効率を提供することを目的としています。

Android

Androidは、Google社が開発したスマートフォンやタブレットなど携帯端末向けのプラットフォームです。 カーネル・ミドルウェア・ユーザーインターフェイス・ウェブブラウザ・電話帳などのアプリケーションやソフトウェアをひとつにまとめて構成。 カーネル・ライブラリ・ランタイムはほとんどがC言語/C++、アプリケーションなどはJavaSEのサブセットとAndroid環境で書かれています。

iOS

iOSとは、Apple製のスマートフォンであるiPhoneやタブレット端末のiPadに搭載しているオペレーションシステム(OS)です。その他にもiPod touch・Apple TVにも搭載されています。

Android Studio

Android Studioは、 Google社によって開発された、 Androidのネイティブアプリケーション開発に特化した統合開発ツールです。

Dart

Dartは、Googleによって開発されたJavaScriptの代替となることを目的に作られた、ウェブ向けのプログラミング言語である。

Q&A

1回答

4761閲覧

flutter build apk --release に失敗する。

Tetsukick

総合スコア297

Flutter

Flutterは、iOSとAndroidのアプリを同じコードで開発するためのフレームワークです。オープンソースで開発言語はDart。双方のプラットフォームにおける高度な実行パフォーマンスと開発効率を提供することを目的としています。

Android

Androidは、Google社が開発したスマートフォンやタブレットなど携帯端末向けのプラットフォームです。 カーネル・ミドルウェア・ユーザーインターフェイス・ウェブブラウザ・電話帳などのアプリケーションやソフトウェアをひとつにまとめて構成。 カーネル・ライブラリ・ランタイムはほとんどがC言語/C++、アプリケーションなどはJavaSEのサブセットとAndroid環境で書かれています。

iOS

iOSとは、Apple製のスマートフォンであるiPhoneやタブレット端末のiPadに搭載しているオペレーションシステム(OS)です。その他にもiPod touch・Apple TVにも搭載されています。

Android Studio

Android Studioは、 Google社によって開発された、 Androidのネイティブアプリケーション開発に特化した統合開発ツールです。

Dart

Dartは、Googleによって開発されたJavaScriptの代替となることを目的に作られた、ウェブ向けのプログラミング言語である。

0グッド

0クリップ

投稿2020/07/30 03:03

編集2020/07/30 03:04

前提・実現したいこと

flutter でリリースビルドのapkを作成したいです。

発生している問題・エラーメッセージ

flutter build apk --releaseを実行すると以下のエラーが発生します。

AQ-S380-MacBookPro:starX teppei.kikuchi$ flutter build apk --release You are building a fat APK that includes binaries for android-arm, android-arm64, android-x64. If you are deploying the app to the Play Store, it's recommended to use app bundles or split the APK to reduce the APK size. To generate an app bundle, run: flutter build appbundle --target-platform android-arm,android-arm64,android-x64 Learn more on: https://developer.android.com/guide/app-bundle To split the APKs per ABI, run: flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi Learn more on: https://developer.android.com/studio/build/configure-apk-splits#configure-abi-split Plugin project :connectivity_macos not found. Please update settings.gradle. Note: /Users/teppei.kikuchi/project/flutter/.pub-cache/hosted/pub.dartlang.org/connectivity-0.4.9/android/src/main/java/io/flutter/plugins/connectivity/ConnectivityBroadcastReceiver.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: /Users/teppei.kikuchi/project/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_analytics-1.2.0+1/android/src/main/java/io/flutter/plugins/firebaseanalytics/FirebaseAnalyticsPlugin.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. Note: /Users/teppei.kikuchi/project/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.2.5+1/android/src/main/java/io/flutter/plugins/firebase/core/FirebaseCorePlugin.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. Removed unused resources: Binary resource data reduced from 304KB to 277KB: Removed 8% FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':firebase_analytics:verifyReleaseResources'. > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade > Android resource linking failed /Users/teppei.kikuchi/.gradle/caches/transforms-2/files-2.1/3aaf6e5219b7f981ec263df919098c6f/core-1.1.0/res/values/values.xml:142:5-173:25: AAPT: error: resource android:attr/fontVariationSettings not found. /Users/teppei.kikuchi/.gradle/caches/transforms-2/files-2.1/3aaf6e5219b7f981ec263df919098c6f/core-1.1.0/res/values/values.xml:142:5-173: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 1m 17s Running Gradle task 'assembleRelease'... Running Gradle task 'assembleRelease'... Done 78.5s 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 1.4s 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 The plugin connectivity could not be built due to the issue above.

該当のソースコード

/Users/teppei.kikuchi/project/flutter/bin/flutter doctor --verbose [✓] Flutter (Channel stable, v1.17.5, on Mac OS X 10.15.4 19E287, locale en-US) • Flutter version 1.17.5 at /Users/teppei.kikuchi/project/flutter • Framework revision 8af6b2f038 (4 weeks ago), 2020-06-30 12:53:55 -0700 • Engine revision ee76268252 • Dart version 2.8.4 [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2) • Android SDK at /Users/teppei.kikuchi/Library/Android/sdk • Platform android-29, build-tools 29.0.2 • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 11.5) • Xcode at /Applications/Xcode_11.5.app/Contents/Developer • Xcode 11.5, Build version 11E608c • CocoaPods version 1.9.1 [✓] Android Studio (version 3.6) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin version 44.0.2 • Dart plugin version 192.7761 • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211) [✓] Connected device (1 available) • Android SDK built for x86 • emulator-5554 • android-x86 • Android 8.1.0 (API 27) (emulator) • No issues found! Process finished with exit code 0

dart:pubspec.yaml

1name: starx 2description: A new Flutter project. 3 4# The following line prevents the package from being accidentally published to 5# pub.dev using `pub publish`. This is preferred for private packages. 6publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 8# The following defines the version and build number for your application. 9# A version number is three numbers separated by dots, like 1.2.43 10# followed by an optional build number separated by a +. 11# Both the version and the builder number may be overridden in flutter 12# build by specifying --build-name and --build-number, respectively. 13# In Android, build-name is used as versionName while build-number used as versionCode. 14# Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 16# Read more about iOS versioning at 17# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 18version: 1.0.0+1 19 20environment: 21 sdk: ">=2.7.0 <3.0.0" 22 23dependencies: 24 flutter: 25 sdk: flutter 26 carousel_slider: ^2.2.1 27 flutter_svg: ^0.17.4 28 auto_size_text: ^2.1.0 29 pin_entry_text_field: ^0.1.3 30 intl: ^0.16.1 31 indonesia: ^1.0.1 32 keyboard_visibility: ^0.5.6 33 http: ^0.12.1 34 shared_preferences: ^0.5.7+3 35 flutter_launcher_icons: ^0.7.5 36 connectivity: ^0.4.9 37 dio: ^3.0.9 38 firebase_core: ^0.2.5 # add dependency for Firebase Core 39 firebase_analytics: ^1.0.4 40 image_picker: ^0.6.0+9 41 photo_view: ^0.9.2 42 json_annotation: 43 provider: ^4.1.3 44 mime_type: ^0.3.2 45 # The following adds the Cupertino Icons font to your application. 46 # Use with the CupertinoIcons class for iOS style icons. 47 cupertino_icons: ^0.1.3 48 49dev_dependencies: 50 flutter_test: 51 sdk: flutter 52 53 build_runner: ^1.7.3 54 json_serializable: 55 freezed: 56 57flutter_icons: 58 android: "launcher_icon" 59 ios: true 60 image_path: "assets/images/logo_starx.png" 61 image_path_ios: "assets/images/logo_starx.png" 62 63# For information on the generic Dart part of this file, see the 64# following page: https://dart.dev/tools/pub/pubspec 65 66# The following section is specific to Flutter. 67flutter: 68 69 # The following line ensures that the Material Icons font is 70 # included with your application, so that you can use the icons in 71 # the material Icons class. 72 uses-material-design: true 73 74 # To add assets to your application, add an assets section, like this: 75 assets: 76 - assets/images/ 77 - assets/svg/ 78 - assets/svg/iconDashboard/ 79 # An image asset can refer to one or more resolution-specific "variants", see 80 # https://flutter.dev/assets-and-images/#resolution-aware. 81 82 # For details regarding adding assets from package dependencies, see 83 # https://flutter.dev/assets-and-images/#from-packages 84 85 # To add custom fonts to your application, add a fonts section here, 86 # in this "flutter" section. Each entry in this list should have a 87 # "family" key with the font family name, and a "fonts" key with a 88 # list giving the asset and other descriptors for the font. For 89 # example: 90 fonts: 91 - family: Quicksand 92 fonts: 93 - asset: fonts/Quicksand-Regular.ttf 94 # For details regarding fonts from package dependencies, 95 # see https://flutter.dev/custom-fonts/#from-packages

補足情報(FW/ツールのバージョンなど)

Pluginのバージョン等が影響しているような記事を見かけました。が、解決できず、、

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

コレではだめでしたか?
https://github.com/flutter/flutter/issues/32595

投稿2020/08/14 01:31

Thrush

総合スコア58

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問