2015/11/29
input command ,then create apk in build folder.
flutter apk
https://github.com/kyorohiro/doc_2dgame/tree/master/demo/mino
> brew install android-sdk
> emacs ~/.bash_profile
> export ANDROID_HOME=/usr/local/opt/android-sdk
> source ~/.bash_profile
> git clone https://github.com/kyorohiro/doc_2dgame.git
> cd demo/mino
> pub get
> pub upgrade
> flutter apk
mkdir apk
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2015 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="info.kyorohiro.umiuni2d.demo.mino" android:versionCode="1" android:versionName="0.0.1">
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="21" />
<uses-permission android:name="android.permission.INTERNET"/>
<application android:name="org.domokit.sky.shell.SkyApplication" android:label="Wonder Minon">
<activity android:name="org.domokit.sky.shell.SkyActivity"
android:launchMode="singleTask"
android:theme="@android:style/Theme.Black.NoTitleBar"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize"
android:hardwareAccelerated="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
"info.kyorohiro.umiuni2d.demo.mino"
"Wonder Minon"
# Ex: For Release
http://developer.android.com/intl/ja/tools/publishing/app-signing.html
keytool -genkey -v -keystore my-release-key.keystore -alias umiuni2d -keyalg RSA -keysize 2048 -validity 10000
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore my_application.apk umiuni2d
## Detail: remove debug certification ``` cd build mkdir w cp app.apk ./w cd w unzip app.apk rm app.apk rm -rf META-INF/ zip ../app_unsigned.apk -r .
<br>
<br>
# Ex: If Add Icon
#### (1)
flutter apk cd build java -jar apktool_2.0.2.jar d app.apk cd app emacs AndroidManifest.xml
#### (2) add "android:icon="@mipmap/ic_launcher"" in AndroidManirest.xml
#### (3) add resource file
./AndroidManifest.xml ... ... .. ./res/mipmap-hdpi ./res/mipmap-hdpi/ic_launcher.png ./res/mipmap-mdpi/.DS_Store ./res/mipmap-mdpi/ic_launcher.png ./res/mipmap-xhdpi/ic_launcher.png ./res/mipmap-xxhdpi/ic_launcher.png ./res/mipmap-xxxhdpi/ic_launcher.png ..
#### (4) build
cd ../ java -jar apktool_2.0.2.jar b app
#### (5) cert
cd app cd dist jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore app.apk umiuni2d zipalign -v 4 app.apk app_zip.apk