1

我试试这个:

zipalign.exe -c -v 4 android-debug.apk 输出为:验证成功

但是当我尝试这个时: zipalign.exe -f -v 4 android-debug.apk android-debug-aligned.apk

我得到这个输出

Verifying alignment of android-debug-aligned.apk (4)...
      49 AndroidManifest.xml (OK - compressed)
    1214 META-INF/CERT.RSA (OK - compressed)
    1864 META-INF/CERT.SF (OK - compressed)
    4898 META-INF/MANIFEST.MF (OK - compressed)
    7906 assets/www/assets/fonts/ionicons.woff (OK - compressed)
   86996 assets/www/assets/fonts/ionicons.woff2 (OK - compressed)
  147927 assets/www/assets/icon/favicon.ico (BAD - 3)
  149978 assets/www/assets/imgs/logo.png (BAD - 2)
  189790 assets/www/build/main.css (OK - compressed)
  260855 assets/www/build/main.js (OK - compressed)
  271779 assets/www/build/polyfills.js (OK - compressed)
  310027 assets/www/build/sw-toolbox.js (OK - compressed)
  316463 assets/www/build/vendor.js (OK - compressed)
  532996 assets/www/cordova-js-src/android/nativeapiprovider.js (OK - compressed)
  533777 assets/www/cordova-js-src/android/promptbasednativeapi.js (OK - compressed)
  534603 assets/www/cordova-js-src/exec.js (OK - compressed)
  538806 assets/www/cordova-js-src/platform.js (OK - compressed)
  540830 assets/www/cordova-js-src/plugin/android/app.js (OK - compressed)
  542437 assets/www/cordova.js (OK - compressed)
  563585 assets/www/cordova_plugins.js (OK - compressed)
  564146 assets/www/index.html (OK - compressed)
  565175 assets/www/manifest.json (OK - compressed)
  565431 assets/www/plugins/cordova-plugin-device/www/device.js (OK - compressed)
  566855 assets/www/plugins/cordova-plugin-geolocation/www/PositionError.js (OK - compressed)
  567675 assets/www/plugins/cordova-plugin-geolocation/www/android/geolocation.js (OK - compressed)
  568810 assets/www/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js (OK - compressed)
  570477 assets/www/plugins/cordova-plugin-ionic-keyboard/www/android/keyboard.js (OK - compressed)
  571239 assets/www/plugins/cordova-plugin-splashscreen/www/splashscreen.js (OK - compressed)
  571927 assets/www/service-worker.js (OK - compressed)
  572377 classes.dex (OK - compressed)
  653636 res/drawable-hdpi-v4/ic_action_next_item.png (OK)
  653989 res/drawable-hdpi-v4/ic_action_previous_item.png (BAD - 1)
  654345 res/drawable-hdpi-v4/ic_action_remove.png (BAD - 1)
  654642 res/drawable-land-hdpi-v4/screen.png (BAD - 2)
  673282 res/drawable-land-ldpi-v4/screen.png (BAD - 2)
  678463 res/drawable-land-mdpi-v4/screen.png (BAD - 3)
  687914 res/drawable-land-xhdpi-v4/screen.png (BAD - 2)
  731632 res/drawable-land-xxhdpi-v4/screen.png (OK)
  798456 res/drawable-land-xxxhdpi-v4/screen.png (OK)
  890685 res/drawable-mdpi-v4/ic_action_next_item.png (BAD - 1)
  890995 res/drawable-mdpi-v4/ic_action_previous_item.png (BAD - 3)
  891299 res/drawable-mdpi-v4/ic_action_remove.png (BAD - 3)
  891558 res/drawable-port-hdpi-v4/screen.png (BAD - 2)
  908977 res/drawable-port-ldpi-v4/screen.png (BAD - 1)
  913998 res/drawable-port-mdpi-v4/screen.png (BAD - 2)
  922973 res/drawable-port-xhdpi-v4/screen.png (BAD - 1)
  965041 res/drawable-port-xxhdpi-v4/screen.png (BAD - 1)
 1026342 res/drawable-port-xxxhdpi-v4/screen.png (BAD - 2)
 1115385 res/drawable-xhdpi-v4/ic_action_next_item.png (BAD - 1)
 1115779 res/drawable-xhdpi-v4/ic_action_previous_item.png (BAD - 3)
 1116168 res/drawable-xhdpi-v4/ic_action_remove.png (OK)
 1116504 res/drawable-xxhdpi-v4/ic_action_next_item.png (OK)
 1116973 res/drawable-xxhdpi-v4/ic_action_previous_item.png (BAD - 1)
 1117441 res/drawable-xxhdpi-v4/ic_action_remove.png (BAD - 1)
 1117836 res/mipmap-hdpi-v4/icon.png (OK)
 1119356 res/mipmap-ldpi-v4/icon.png (OK)
 1120246 res/mipmap-mdpi-v4/icon.png (BAD - 2)
 1121410 res/mipmap-xhdpi-v4/icon.png (BAD - 2)
 1123182 res/mipmap-xxhdpi-v4/icon.png (BAD - 2)
 1125517 res/mipmap-xxxhdpi-v4/icon.png (BAD - 1)
 1128201 res/xml/config.xml (OK - compressed)
 1130327 resources.arsc (BAD - 3)
Verification FAILED

如果检查有效,为什么我会失败?我怎样才能得到对齐的错误?

为什么会失败?

我使用 android sdk 26 和 ionic 框架。

4

1 回答 1

-1

您是否像 ionic cordova build android --release 那样构建了您的应用程序?

于 2018-08-14T22:24:23.333 回答