Alex Dai Playground

Posts match “ android ” tag:

[Android] APK Sign

| Comments

需要 keytool.exe 和 jarsigner.exe, 在 Java\jdk1.8.0_05\bin\bin 底下

建立 keystore

keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000

簽署 APK

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore -signedjar android-release-signed.apk android-release-unsigned.apk alias_name -storepass yourpass
加密方式
  • SHA1withRSA
  • MD5withRSA

驗證

jarsigner -verify android-release-signed.apk

成功會顯示 "jar varified"

[Travis-CI] Could not find any version that matches com.android.support:support-v13:23+

| Comments

因為 ionic 使用了phonegap-plugin-push 套件

travis-ci 執行到 $ ionic build --release android

發生以下錯誤:

FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':_debugCompile'.
   > Could not find any version that matches com.android.support:support-v13:23+.
     Searched in the following locations:
         https://repo1.maven.org/maven2/com/android/support/support-v13/maven-metadata.xml
         https://repo1.maven.org/maven2/com/android/support/support-v13/
         file:/usr/local/android-sdk/extras/android/m2repository/com/android/support/support-v13/maven-metadata.xml
         file:/usr/local/android-sdk/extras/google/m2repository/com/android/support/support-v13/maven-metadata.xml
         file:/usr/local/android-sdk/extras/google/m2repository/com/android/support/support-v13/
     Required by:
         :android:unspecified
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED

解決方法:
.travis.yml add Additional components

  components:
  - extra-android-m2repository
  - extra-google-m2repository

https://github.com/travis-ci/travis-ci/issues/2470
http://docs.travis-ci.com/user/languages/android/#CI-Environment-for-Android-Projects