重现添加platform时可以禁止重新生成splash和icon

ionic cordova platform add android --no-resources

splash自定义图片太大会mprocessDebugResources错误

\platforms\android\build.gradle

android {
    aaptOptions {
        cruncherEnabled = false
        useNewCruncher = false
    }
window.screen.orientation.unlock();
window.screen.orientation.lock("portrait");
<preference name="orientation" value="portrait" />  

微信插件要带APPID安装

否则打包后会有问题

cordova plugin add cordova-plugin-wechat --variable wechatappid=wx4a525790c75c4941f

cordova plugin add jpush-phonegap-plugin --variable APP_KEY=26218938532daa6c8446c2b15

获取屏幕大小

var device_x = window.screen.width;
var device_y = window.screen.height;

相关文章:

  • 2021-04-30
  • 2021-10-17
猜你喜欢
  • 2021-09-05
  • 2022-12-23
  • 2022-12-23
  • 2021-05-19
  • 2022-12-23
  • 2022-01-18
  • 2021-12-30
相关资源
相似解决方案