App crashed when it enter in the login.Service and return this.http.get

When my apk enter in this Login.Service from the android

import { Injectable } from ‘@angular/core’;

import { HttpClient } from ‘@angular/common/http’;

import { HttpClientModule } from ‘@angular/common/http’;

import { map } from ‘rxjs/operators’;

import { Platform } from ‘@ionic/angular’;


providedIn: ‘root’


export class LoginService {

constructor(public http: HttpClient,platform: Platform) {


//in this line it crashed
return this.http.get(“"+usuario+"/"+clave+"”)



it crashed and closed unexpectedly, but when I run the app from the browser it works correctly

Does the problem persist even when using an https:// API endpoint? (which you really want to be doing anyway for security reasons)

I have not tried https yet, do you think that is the solution? What other solution can you give me?

If you want any other information about my code, let me know