AndroidManifest.xml文件修改android:windowSoftInputMode="adjustPan"android:windowSoftInputMode="adjustPan|stateHidden"

如上图修改后,重新打包: ionic cordova build android --prod。其实这样已经可以解决问题,但是在这里修改如果platform被移除重新添加就会失效,必须重新修改,在config.xml中配置可一劳永逸

这样就不用去AndroidManifest.xml修改了,config.xml配置打包时会自动修改AndroidManifest.xml中配置

config.xml中代码

<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application" xmlns:android="http://schemas.android.com/apk/res/android">
     <application android:networkSecurityConfig="@xml/network_security_config" />
</edit-config>

 

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐