http://wiki.nonip.net/index.php?title=Flutter/%E9%96%8B%E7%99%BA%E7%92%B0%E5%A2%83%E6%A7%8B%E7%AF%89/%E5%85%B1%E9%80%9A&feed=atom&action=history
Flutter/開発環境構築/共通 - 変更履歴
2024-03-29T12:49:07Z
このウィキのこのページに関する変更履歴
MediaWiki 1.24.2
http://wiki.nonip.net/index.php?title=Flutter/%E9%96%8B%E7%99%BA%E7%92%B0%E5%A2%83%E6%A7%8B%E7%AF%89/%E5%85%B1%E9%80%9A&diff=17435&oldid=prev
Admin: /* AndroidStudioのプラグインインストール */
2023-08-22T17:45:38Z
<p><span dir="auto"><span class="autocomment">AndroidStudioのプラグインインストール</span></span></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">←前の版</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">2023年8月22日 (火) 17:45時点における版</td>
</tr><tr><td colspan="2" class="diff-lineno">行4:</td>
<td colspan="2" class="diff-lineno">行4:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>==AndroidStudioのプラグインインストール==</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>==AndroidStudioのプラグインインストール==</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>AndroidStudio/<del class="diffchange diffchange-inline">Preference</del>/PluginsからFlutter、Dartを検索してインストール</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>AndroidStudio/<ins class="diffchange diffchange-inline">Settings</ins>/PluginsからFlutter、Dartを検索してインストール</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>==プロジェクト作成==</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>==プロジェクト作成==</div></td></tr>
</table>
Admin
http://wiki.nonip.net/index.php?title=Flutter/%E9%96%8B%E7%99%BA%E7%92%B0%E5%A2%83%E6%A7%8B%E7%AF%89/%E5%85%B1%E9%80%9A&diff=9400&oldid=prev
2019年11月13日 (水) 13:09にAdminによる
2019-11-13T13:09:50Z
<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">←前の版</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">2019年11月13日 (水) 13:09時点における版</td>
</tr><tr><td colspan="2" class="diff-lineno">行28:</td>
<td colspan="2" class="diff-lineno">行28:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  version: 1.0.1+2</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  version: 1.0.1+2</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>+2はandroid側の番号</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>+2はandroid側の番号</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">==右上のdebug文字を消す==</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"><pre></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">class MyApp extends StatelessWidget {</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">    // This widget is the root of your application.</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">    @override</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">    Widget build(BuildContext context) {</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">        return MaterialApp(</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">            debugShowCheckedModeBanner: false, // 右上のdebug文字を消す</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">                title: 'Test',</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></pre></ins></div></td></tr>
</table>
Admin
http://wiki.nonip.net/index.php?title=Flutter/%E9%96%8B%E7%99%BA%E7%92%B0%E5%A2%83%E6%A7%8B%E7%AF%89/%E5%85%B1%E9%80%9A&diff=9395&oldid=prev
Admin: /* android・ios実行 */
2019-11-13T09:42:19Z
<p><span dir="auto"><span class="autocomment">android・ios実行</span></span></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">←前の版</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">2019年11月13日 (水) 09:42時点における版</td>
</tr><tr><td colspan="2" class="diff-lineno">行23:</td>
<td colspan="2" class="diff-lineno">行23:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>*接続したandroid・iPhoneの端末が表示される</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>*接続したandroid・iPhoneの端末が表示される</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>*基本hotreloadで2秒で更新が反映される。</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>*基本hotreloadで2秒で更新が反映される。</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">==android・iosのバージョン記述場所==</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">pubspec.yaml</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> version: 1.0.1+2</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">+2はandroid側の番号</ins></div></td></tr>
</table>
Admin
http://wiki.nonip.net/index.php?title=Flutter/%E9%96%8B%E7%99%BA%E7%92%B0%E5%A2%83%E6%A7%8B%E7%AF%89/%E5%85%B1%E9%80%9A&diff=9392&oldid=prev
Admin: /* gitignore */
2019-11-13T09:21:40Z
<p><span dir="auto"><span class="autocomment">gitignore</span></span></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">←前の版</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">2019年11月13日 (水) 09:21時点における版</td>
</tr><tr><td colspan="2" class="diff-lineno">行14:</td>
<td colspan="2" class="diff-lineno">行14:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  flutter run</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  flutter run</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>==<del class="diffchange diffchange-inline">gitignore</del>==</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>==<ins class="diffchange diffchange-inline">git無視ファイル</ins>==</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">.gitignoreファイルは以下からコピー</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> </div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>https://github.com/flutter/flutter/blob/master/.gitignore</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>https://github.com/flutter/flutter/blob/master/.gitignore</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">ここからコピーする</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>==android・ios実行==</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>==android・ios実行==</div></td></tr>
</table>
Admin
http://wiki.nonip.net/index.php?title=Flutter/%E9%96%8B%E7%99%BA%E7%92%B0%E5%A2%83%E6%A7%8B%E7%AF%89/%E5%85%B1%E9%80%9A&diff=9391&oldid=prev
2019年11月13日 (水) 09:21にAdminによる
2019-11-13T09:21:13Z
<p></p>
<a href="http://wiki.nonip.net/index.php?title=Flutter/%E9%96%8B%E7%99%BA%E7%92%B0%E5%A2%83%E6%A7%8B%E7%AF%89/%E5%85%B1%E9%80%9A&diff=9391&oldid=9387">差分を表示</a>
Admin
http://wiki.nonip.net/index.php?title=Flutter/%E9%96%8B%E7%99%BA%E7%92%B0%E5%A2%83%E6%A7%8B%E7%AF%89/%E5%85%B1%E9%80%9A&diff=9387&oldid=prev
Admin: ページの作成:「 ==AndroidStudioのインストール== https://developer.android.com/studio/install?hl=ja ==AndroidStudioのプラグインインストール== AndroidStudio/Preference...」
2019-11-13T09:18:59Z
<p>ページの作成:「 ==AndroidStudioのインストール== https://developer.android.com/studio/install?hl=ja ==AndroidStudioのプラグインインストール== AndroidStudio/Preference...」</p>
<p><b>新規ページ</b></p><div><br />
==AndroidStudioのインストール==<br />
https://developer.android.com/studio/install?hl=ja<br />
<br />
==AndroidStudioのプラグインインストール==<br />
AndroidStudio/Preference/PluginsからFlutter、Dartを検索してインストール<br />
<br />
==プロジェクト作成==<br />
File/New Flutter Project がFile/New Projectの下に表示されるはずなので、そこから作成。<br />
<br />
"New Flutter Project"が出ない場合は以下コマンドでプロジェクトを作ってAndroidStudioで開けば良い。<br />
flutter create my_app<br />
cd my_app<br />
flutter run<br />
<br />
==gitignore==<br />
https://github.com/flutter/flutter/blob/master/.gitignore<br />
ここからコピーする<br />
<br />
==ios実行準備==<br />
xcode-select --install<br />
brew update<br />
sudo gem install cocoapods<br />
sudo gem install -n /usr/local/bin cocoapods<br />
brew install --HEAD usbmuxd<br />
brew link usbmuxd<br />
brew install --HEAD libimobiledevice<br />
brew install ideviceinstaller<br />
brew install ios-deploy<br />
<br />
==android・ios実行==<br />
*上部中央に実行ボタンがあるので、そこから実行できる。<br />
*接続したandroid・iPhoneの端末が表示される<br />
*基本hotreloadで2秒で更新が反映される。<br />
<br />
==androidのapk作成&インストール==<br />
flutter build apk<br />
flutter install #これはアンインストール後にインストールされるので直で実行した端末のprefなどは消える。<br />
↑はリリースビルドで、リリースビルドのときはデバッグビルド(1秒程度)と比べて起動速度が速い。<br />
build/app/outputs/apk/release/app-release.apk<br />
<br />
==iosのipaファイル作成&インストール==<br />
flutter build ios<br />
flutter install #これはアンインストール後にインストールされるので直で実行した端末のprefなどは消える。<br />
<br />
==androidパッケージ名変更==<br />
*android/app/src/main/AndroidManifest.xml<br />
*android/app/build.gradle<br />
*android/app/src/profile/AndroidManifest.xml<br />
*android/app/src/debug/AndroidManifest.xml<br />
<manifest xmlns:android="http://schemas.android.com/apk/res/android"<br />
package="com.example1.hoge"><br />
*android/app/src/main/com/example1/hoge/MainActivity.java<br />
package com.example1.hoge; <br />
2箇所変更とMainActivity.javaのdir変更<br />
<br />
==iosのbundleId変更==<br />
*ios/Runner.xcodeprojを開いてbundleIdを変更する<br />
*podを使っていれば、コンソールでiosの下で、"pod update"を実行後ios/Runner.xcworkspaceを開いてbundleIdを変更する<br />
<br />
==iosで以下エラーが出るとき==<br />
flutter clang: error: linker command failed with exit code 1 (use -v to see invocation)<br />
<br />
以下実行<br />
$ flutter clean<br />
<br />
参考:https://stackoverflow.com/questions/49612211/codesign-error-with-flutter-on-ios<br />
<br />
==androidのkeystore付きapk作成==<br />
#keystoreを作っておく<br />
#android/key.properties を作成<br />
storePassword=パスを入れる<br />
keyPassword=パスを入れる<br />
keyAlias=key<br />
storeFile=keystoreのパスを入れる・・・key.jks<br />
<br />
#android/app/build.gradle を追加する<br />
+def keystorePropertiesFile = rootProject.file("key.properties")<br />
+def keystoreProperties = new Properties()<br />
+keystoreProperties.load(new FileInputStream(keystorePropertiesFile))<br />
<br />
android {<br />
<br />
#android/app/build.gradle の部分を修正<br />
<pre><br />
-buildTypes {<br />
- release {<br />
- // TODO: Add your own signing config for the release build.<br />
- // Signing with the debug keys for now, so `flutter run --release` works.<br />
- signingConfig signingConfigs.debug<br />
- }<br />
-}<br />
+signingConfigs {<br />
+ release {<br />
+ keyAlias keystoreProperties['keyAlias']<br />
+ keyPassword keystoreProperties['keyPassword']<br />
+ storeFile file(keystoreProperties['storeFile'])<br />
+ storePassword keystoreProperties['storePassword']<br />
+ }<br />
+}<br />
+buildTypes {<br />
+ release {<br />
+ signingConfig signingConfigs.release<br />
+ }<br />
+}<br />
</pre><br />
<br />
参考:https://qiita.com/rkowase/items/f1012ef0738791dd6084<br />
<br />
==Androidで64 ビット要件に準拠していませんが表示された場合==<br />
このリリースは Google Play の 64 ビット要件に準拠していません<br />
flutter build apk --release --target-platform=android-arm64<br />
<br />
もしくは、<br />
<br />
build.gradle<br />
buildTypes {<br />
release {<br />
ndk{<br />
abiFilters "x86", "arm64-v8a", "android-arm64"<br />
}<br />
}<br />
}<br />
<br />
参考:https://github.com/flutter/flutter/issues/18494<br />
<br />
===ビルドは成功するが起動時に落ちてcouldn't find "libflutter.so"エラーが出る場合===<br />
上の項目のndkにabiFiltersが追加されてるかを確認<br />
$ flutter build apk --release<br />
releaseをつけてapkを作成する<br />
<br />
===abiFiltersで指定したものの確認===<br />
$ flutter build apk --release<br />
apkをunzipで解凍して確認<br />
unzip build/app/outputs/apk/release/app-release.apk<br />
ls lib/arm64-v8a/libflutter.so<br />
ls lib/armeabi-v7a/libflutter.so<br />
<br />
参考:https://qiita.com/mkosuke/items/afa40c09078285034799<br />
<br />
==Androidのversion記述場所==<br />
pubspec.yaml<br />
version: 1.0.1+2<br />
<br />
$ flutter build apk<br />
<br />
以下ファイルが以下の通り出力されればよい。<br />
<br />
android/local.properties<br />
flutter.versionName=1.0.1<br />
flutter.versionCode=2<br />
<br />
==公式androidの64bit対応方法==<br />
https://developer.android.com/distribute/best-practices/develop/64-bit<br />
===64bit対応済み判定===<br />
#androidStudioでBuild/ApkAnalyzeでapkファイルを指定<br />
#libの下に以下dirがあれば良い。<br />
arm64-v8a<br />
x86_64<br />
==="このリリースは Google Play の 64 ビット要件に準拠していません"が出る場合===<br />
flutter upgrade<br />
flutter --version<br />
Flutterのバージョンを1.7以上へ<br />
<br />
https://algorithm.joho.info/flutter/flutter-erroe-google-play-64bit/<br />
<br />
==androidのaab対応==<br />
flutterの1.7でaab対応<br />
flutter upgrade<br />
flutter --version<br />
<br />
apkからappbundleにするだけ<br />
flutter build apk --release<br />
↓<br />
flutter build appbundle --release<br />
<br />
aabの出力先は build/app/outputs/bundle/release/app.aab<br />
<br />
==androidxの対応==<br />
build時に以下のような警告が出る。<br />
<pre><br />
[!] Your app isn't using AndroidX.<br />
To avoid potential build failures, you can quickly migrate your app by following the steps on https://goo.gl/CP92wY.<br />
</pre><br />
<br />
pubspec.yamlの一番下のflutter:の下に追加<br />
<pre><br />
flutter:<br />
module:<br />
androidX: true<br />
androidPackage: com.example.hogehoge<br />
iosBundleIdentifier: com.example.hogehoge<br />
</pre><br />
buildしてみたが、やっぱり警告は出る・・・。<br />
<br />
以下でandroidx対応のプロジェクトは作れるようなので、差分を追う良いかも。<br />
flutter create --androidx -t module my_flutter_androidx<br />
↑これandroidx対応かどうかは怪しい・・(調べてない。</div>
Admin