流星移动应用程序无法在Android 9和10上运行

问题描述

我通过流星项目制作了一个移动应用程序。 该应用程序在Android 7和8上运行良好。

但是它在Android 9和10上不起作用。登录页面显示在移动设备上,但我无法登录。 似乎请求未发送到服务器,并且在单击登录名后,仍保持加载模式。

enter image description here

我已经在系统上安装了版本29的SDK。这是我的mobile-config.js。

App.info({
  id: 'com.marco.android.karname',name: 'karname',description: 'Debug mode',author: 'Matt Development Group',email: 'contact@example.com',website: 'http://example.com',version: "0.0.3"
});

App.icons({
  'android_xxhdpi': 'resources/icons/en-logo.png',});

App.launchScreens({
  'android_mdpi_portrait': 'resources/icons/sample.png',});

App.setPreference('BackgroundColor','0xff0000ff');
App.setPreference('HideKeyboardFormAccessoryBar',true);
App.setPreference('Orientation','default');
App.setPreference('Orientation','all','ios');

App.setPreference('android-targetSdkVersion','30');
App.setPreference('android-minSdkVersion','24');

App.appendToConfig(`
  <universal-links>
    <host name="http://192.168.0.66" />
  </universal-links>
`);

这是我的日志:

..
2020-10-07 19:08:03.096 2157-3396/? E/aofp: Phenotype API error. Event # bybz@5dc8807f,EventCode: 12 [CONTEXT service_id=51 ]
    aoeg: 29503
        at aofv.b(:com.google.android.gms@17786022@17.7.86 (040700-256199907):23)
        at aofp.a(:com.google.android.gms@17786022@17.7.86 (040700-256199907):92)
        at aofp.a(:com.google.android.gms@17786022@17.7.86 (040700-256199907):79)
        at aale.run(:com.google.android.gms@17786022@17.7.86 (040700-256199907):19)
        at bkdz.run(:com.google.android.gms@17786022@17.7.86 (040700-256199907):2)
        at squ.b(:com.google.android.gms@17786022@17.7.86 (040700-256199907):37)
        at squ.run(:com.google.android.gms@17786022@17.7.86 (040700-256199907):21)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at swz.run(UnkNown Source:7)
        at java.lang.Thread.run(Thread.java:919)
2020-10-07 19:08:03.099 2157-3396/? E/Asyncoperation: serviceID=51,operation=GetCommittedConfigurationoperationCall
    OperationException[Status{statusCode=unkNown status code: 29503,resolution=null}]
        at aofp.a(:com.google.android.gms@17786022@17.7.86 (040700-256199907):100)
        at aofp.a(:com.google.android.gms@17786022@17.7.86 (040700-256199907):79)
        at aale.run(:com.google.android.gms@17786022@17.7.86 (040700-256199907):19)
        at bkdz.run(:com.google.android.gms@17786022@17.7.86 (040700-256199907):2)
        at squ.b(:com.google.android.gms@17786022@17.7.86 (040700-256199907):37)
        at squ.run(:com.google.android.gms@17786022@17.7.86 (040700-256199907):21)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at swz.run(UnkNown Source:7)
        at java.lang.Thread.run(Thread.java:919)
2020-10-07 19:08:03.100 2157-3786/? E/NetRec: [88] alcj.a: Could not retrieve server token for package com.google.android.apps.gcs
    java.util.concurrent.ExecutionException: rjk: 29503: 
        at avgu.b(:com.google.android.gms@17786022@17.7.86 (040700-256199907):3)
        at avgu.a(:com.google.android.gms@17786022@17.7.86 (040700-256199907):20)
        at alcj.a(:com.google.android.gms@17786022@17.7.86 (040700-256199907):1)
        at alcj.a(:com.google.android.gms@17786022@17.7.86 (040700-256199907):4)
        at alce.getHeaders(:com.google.android.gms@17786022@17.7.86 (040700-256199907):2)
        at com.android.volley.toolBox.HttpClientStack.performRequest(:com.google.android.gms@17786022@17.7.86 (040700-256199907):9)
        at sjg.performRequest(:com.google.android.gms@17786022@17.7.86 (040700-256199907):1)
        at byj.executeRequest(:com.google.android.gms@17786022@17.7.86 (040700-256199907):1)
        at com.android.volley.toolBox.BasicNetwork.performRequest(:com.google.android.gms@17786022@17.7.86 (040700-256199907):5)
        at sjj.performRequest(:com.google.android.gms@17786022@17.7.86 (040700-256199907):13)
        at com.android.volley.Networkdispatcher.a(:com.google.android.gms@17786022@17.7.86 (040700-256199907):7)
        at com.android.volley.Networkdispatcher.run(:com.google.android.gms@17786022@17.7.86 (040700-256199907):2)
     Caused by: rjk: 29503: 
        at rpj.a(:com.google.android.gms@17786022@17.7.86 (040700-256199907):4)
        at aodi.b(:com.google.android.gms@17786022@17.7.86 (040700-256199907):2)
        at aofv.a(:com.google.android.gms@17786022@17.7.86 (040700-256199907):6)
        at aale.run(:com.google.android.gms@17786022@17.7.86 (040700-256199907):30)
        at bkdz.run(:com.google.android.gms@17786022@17.7.86 (040700-256199907):2)
        at squ.b(:com.google.android.gms@17786022@17.7.86 (040700-256199907):37)
        at squ.run(:com.google.android.gms@17786022@17.7.86 (040700-256199907):21)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at swz.run(UnkNown Source:7)
        at java.lang.Thread.run(Thread.java:919)
2020-10-07 19:08:03.100 2157-3786/? W/NetRec: [88] alcj.a: No server tokens extracted.
2020-10-07 19:08:03.107 12822-12869/com.marco.android.karname D/eglCodecCommon: setVertexArrayObject: set vao to 1 (1) 1 6
2020-10-07 19:08:03.111 12822-12869/com.marco.android.karname D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 1 2
2020-10-07 19:08:03.128 12822-12869/com.marco.android.karname D/eglCodecCommon: setVertexArrayObject: set vao to 1 (1) 1 6
2020-10-07 19:08:03.131 12822-12869/com.marco.android.karname D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 1 2
..


..
2020-10-07 19:10:58.926 12822-12869/com.marco.android.karname D/eglCodecCommon: setVertexArrayObject: set vao to 1 (1) 1 6
2020-10-07 19:10:58.933 12822-12869/com.marco.android.karname D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 1 2
2020-10-07 19:10:58.936 1747-2376/? E/GnssHAL_GnssInterface: gnssSvstatusCb: a: input svInfo.flags is 8
2020-10-07 19:10:58.936 1747-2376/? E/GnssHAL_GnssInterface: gnssSvstatusCb: b: input svInfo.flags is 8
2020-10-07 19:10:58.983 12822-12869/com.marco.android.karname D/eglCodecCommon: setVertexArrayObject: set vao to 1 (1) 1 6
2020-10-07 19:10:58.986 12822-12869/com.marco.android.karname D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 1 2
..

解决方法

根据this answer,我在mobile-config.js中将targetSdkVersion版本从30减少到27。现在它正在工作。

App.setPreference('android-targetSdkVersion','27');
App.setPreference('android-minSdkVersion','24');