Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ionic-framework/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ionic framework 减少存储空间的离子存储问题_Ionic Framework_Ionic3_Ionic Native_Ionic Storage - Fatal编程技术网

Ionic framework 减少存储空间的离子存储问题

Ionic framework 减少存储空间的离子存储问题,ionic-framework,ionic3,ionic-native,ionic-storage,Ionic Framework,Ionic3,Ionic Native,Ionic Storage,我在我的应用程序中使用了离子存储,启动应用程序几乎需要1GB的设备空间。 如果设备内存没有至少1GB的空间,应用程序将不会启动。在清除了那个记忆之后,我就可以启动了 通过这种方式,我尝试在登录到本地存储后保存一些数据 const seq = this.api.post('signin', value).share(); seq.subscribe((res: any) => { // If the API returned a successful response,

我在我的应用程序中使用了离子存储,启动应用程序几乎需要1GB的设备空间。 如果设备内存没有至少1GB的空间,应用程序将不会启动。在清除了那个记忆之后,我就可以启动了

通过这种方式,我尝试在登录到本地存储后保存一些数据

const seq = this.api.post('signin', value).share();
    seq.subscribe((res: any) => {
      // If the API returned a successful response, mark the user as logged in
      if (res.statusCode === 200) {
        (window as any).FirebasePlugin.setUserProperty('loggedInUserId', res.user);
        this.passwordMismatch = '';
        this.invalidSinIn = false;
        const isExistingUser = true;
        // store details into ionic storage
        Promise.all([this.storage.set('user', res.user), this.storage.set('token', res.token),
        this.storage.set('isVerified', res.isVerified), this.storage.set('authType', 'email'),
        this.storage.set('refreshToken', res.refreshToken), this.storage.set('referalCode', res.referalCode),
        this.storage.set('existingUser', isExistingUser), this.storage.set('isProfileCompleted', res.isProfileCompleted)]).then(() => {
          this.navCtrl.setRoot(MainPage);
        });
      }
    });
如果设备的可用空间超过1GB,则此功能正常工作,但如果内存不足,则会失败

请帮我解决这个问题。我是爱奥尼亚的新手 我正在使用

离子骨架:3.9.2

爱奥尼亚应用程序脚本:3.1.2


Angular Core:5.0.0

你想保存什么,需要这么多的内存空间?我在代码中指定了,请看一看,我主要是保存一些布尔值和JWT标记。上面给出的代码没有提示你的问题。还有其他原因导致了这个问题。我的建议是将您的代码放在git或其他地方并共享代码。