ionic android http 不能访问

ionic android http 不能访问,解决安卓不能访问http的问题

修改:capacitor.config.ts

import type { CapacitorConfig } from '@capacitor/cli';

const config: CapacitorConfig = {
  appId: 'io.ionic.starter',
  appName: 'test01',
  webDir: 'dist',
  server: {
    androidScheme: 'http',
    cleartext: true
  }
};

export default config;

  添加 server 的设置

posted on 2024-11-09 12:13  少杨  阅读(69)  评论(0)    收藏  举报