0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

[Ionic4 Cordova9 Android] ERR_CREARTEXT_NOT_PERMITTED

Last updated at Posted at 2019-10-05

以下のエラーが出た時の対処方

Application Error
net::ERR_CREARTEXT_NOT_PERMITTED(http://localhost:8100/)

Android9以降ではクリアテキスト(平分)通信が許可されていないため発生する

config.xmlに以下を追加する

<widget ・・・>に以下を追加

xmlns:android="http://schemas.android.com/apk/res/android"

<platform name="android">の下に追加

    <platform name="android">
        <edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
            <application android:usesCleartextTraffic="true" />
        </edit-config>

確認

ionic cordova run android -l

バージョン情報

$ ionic info

Ionic:

   Ionic CLI                     : 5.4.2
   Ionic Framework               : @ionic/angular 4.10.0
   @angular-devkit/build-angular : 0.12.4
   @angular-devkit/schematics    : 7.2.4
   @angular/cli                  : 7.2.4
   @ionic/angular-toolkit        : 1.2.3

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : android 8.1.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 2.5.2, (and 4 other plugins)

Utility:

   cordova-res : 0.6.0 (update available: 0.7.0)
   native-run  : 0.2.8 

System:

   Android SDK Tools : 26.1.1
   NodeJS            : v10.16.0
   npm               : 6.11.3
   OS                : Linux 4.19

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?