如何解决 Android Studio 中的 Phenotype API 错误?

Posted

技术标签:

【中文标题】如何解决 Android Studio 中的 Phenotype API 错误?【英文标题】:How to solve Phenotype API error in Android Studio? 【发布时间】:2020-12-11 04:43:03 【问题描述】:

我正在使用 Java 在 android Studio 中构建一个简单的 Space Invaders 游戏。我之前运行游戏时没有看到这些错误。 Android Studio 文件夹中的项目和其他项目运行良好,但后来我可能不小心遇到了错误,当我运行程序时,所有项目都显示类似的错误。我正在使用带有 API 29 的模拟器,我安装的 SDK 平台是 API 29、API 30。 我尝试了什么:

擦除数据,使用其他模拟器 确保清单中的包名相同 卸载,然后重新安装平台工具\

我使用的来源: Failed to open QEMU pipe 'qemud:network': Invalid argument https://www.thetopsites.net/article/53766789.shtml\ https://***.com/questions/22629568/couldnt-load-memtrack-module-logcat-error/22745487#comment34571006_22629568\ "unable to locate adb" using Android Studio

SDK Tools I installed\

Logcat:

2020-08-21 12:03:33.345 2100-2136/system_process E/system_server: Invalid ID 0x00000000.
2020-08-21 12:03:33.539 10844-10844/? E/e.spaceinvader: Unknown bits set in runtime_flags: 0x8000
2020-08-21 12:03:33.825 1839-1996/? E/SurfaceFlinger: ro.sf.lcd_density must be defined as a build property
2020-08-21 12:03:37.954 1948-1948/? E/wifi_forwarder: RemoteConnection failed to initialize: RemoteConnection failed to open pipe
2020-08-21 12:03:38.015 1946-1946/? E/netmgr: Failed to open QEMU pipe 'qemud:network': Invalid argument
2020-08-21 12:03:44.406 2100-2140/system_process E/memtrack: Couldn't load memtrack module
2020-08-21 12:03:55.561 2339-3855/com.google.android.gms.persistent E/amvj: Phenotype API error. Event # byvc@1a946355, EventCode: 12 [CONTEXT service_id=51 ]
    amum: 29503
        at amvp.b(:com.google.android.gms@200414022@20.04.14 (040700-294335909):27)
        at amvj.a(:com.google.android.gms@200414022@20.04.14 (040700-294335909):91)
        at amvj.a(:com.google.android.gms@200414022@20.04.14 (040700-294335909):77)
        at aabf.run(:com.google.android.gms@200414022@20.04.14 (040700-294335909):7)
        at bkdt.run(:com.google.android.gms@200414022@20.04.14 (040700-294335909):2)
        at srw.b(:com.google.android.gms@200414022@20.04.14 (040700-294335909):14)
        at srw.run(:com.google.android.gms@200414022@20.04.14 (040700-294335909):2)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at sxw.run(:com.google.android.gms@200414022@20.04.14 (040700-294335909):0)
        at java.lang.Thread.run(Thread.java:919)
2020-08-21 12:03:55.561 2339-3855/com.google.android.gms.persistent E/AsyncOperation: serviceID=51, operation=GetCommittedConfigurationOperationCall
    OperationException[StatusstatusCode=unknown status code: 29503, resolution=null]
        at amvj.a(:com.google.android.gms@200414022@20.04.14 (040700-294335909):92)
        at amvj.a(:com.google.android.gms@200414022@20.04.14 (040700-294335909):77)
        at aabf.run(:com.google.android.gms@200414022@20.04.14 (040700-294335909):7)
        at bkdt.run(:com.google.android.gms@200414022@20.04.14 (040700-294335909):2)
        at srw.b(:com.google.android.gms@200414022@20.04.14 (040700-294335909):14)
        at srw.run(:com.google.android.gms@200414022@20.04.14 (040700-294335909):2)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at sxw.run(:com.google.android.gms@200414022@20.04.14 (040700-294335909):0)
        at java.lang.Thread.run(Thread.java:919)
2020-08-21 12:03:55.562 2339-4663/com.google.android.gms.persistent E/NetRec: [147] ajzf.a: Could not retrieve server token for package com.google.android.apps.gcs
    java.util.concurrent.ExecutionException: rmz: 29503: 
        at atjq.b(:com.google.android.gms@200414022@20.04.14 (040700-294335909):5)
        at atjq.a(:com.google.android.gms@200414022@20.04.14 (040700-294335909):23)
        at ajzf.a(:com.google.android.gms@200414022@20.04.14 (040700-294335909):1)
        at ajzf.a(:com.google.android.gms@200414022@20.04.14 (040700-294335909):4)
        at ajze.getHeaders(:com.google.android.gms@200414022@20.04.14 (040700-294335909):2)
        at com.android.volley.toolbox.HttpClientStack.performRequest(:com.google.android.gms@200414022@20.04.14 (040700-294335909):20)
        at sle.performRequest(:com.google.android.gms@200414022@20.04.14 (040700-294335909):1)
        at bme.executeRequest(:com.google.android.gms@200414022@20.04.14 (040700-294335909):1)
        at com.android.volley.toolbox.BasicNetwork.performRequest(:com.google.android.gms@200414022@20.04.14 (040700-294335909):10)
        at slf.performRequest(:com.google.android.gms@200414022@20.04.14 (040700-294335909):17)
        at com.android.volley.NetworkDispatcher.a(:com.google.android.gms@200414022@20.04.14 (040700-294335909):6)
        at com.android.volley.NetworkDispatcher.run(:com.google.android.gms@200414022@20.04.14 (040700-294335909):2)
     Caused by: rmz: 29503: 
        at rsm.a(:com.google.android.gms@200414022@20.04.14 (040700-294335909):4)
        at amux.b(:com.google.android.gms@200414022@20.04.14 (040700-294335909):3)
        at amvp.a(:com.google.android.gms@200414022@20.04.14 (040700-294335909):7)
        at aabf.run(:com.google.android.gms@200414022@20.04.14 (040700-294335909):15)
        at bkdt.run(:com.google.android.gms@200414022@20.04.14 (040700-294335909):2)
        at srw.b(:com.google.android.gms@200414022@20.04.14 (040700-294335909):14)
        at srw.run(:com.google.android.gms@200414022@20.04.14 (040700-294335909):2)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at sxw.run(:com.google.android.gms@200414022@20.04.14 (040700-294335909):0)
        at java.lang.Thread.run(Thread.java:919)
2020-08-21 12:03:55.626 2339-4663/com.google.android.gms.persistent E/Volley: [147] BasicNetwork.performRequest: Unexpected response code 400 for https://mobilenetworkscoring-pa.googleapis.com/v1/GetWifiQuality?key=AIzaSyBrlVtd67QvwS_Wz0Do4ZIdOeA6ThtVczU

2020-08-21 12:05:53.238 2339-2339/com.google.android.gms.persistent E/BeaconBle: Missing BluetoothAdapter
2020-08-21 12:05:53.247 2339-2339/com.google.android.gms.persistent E/BeaconBle: Scan couldn't start for Places

【问题讨论】:

这段时间你解决了吗? 面临类似问题。是 Android Studio 还是设备的问题?之后我的活动就关闭了 【参考方案1】:

对我来说,这是由于布局文件中遗漏的错误造成的。我错误地从EditText 中删除了layout_width 属性,当我尝试构建时,我得到了Phenotype API 错误。

【讨论】:

以上是关于如何解决 Android Studio 中的 Phenotype API 错误?的主要内容,如果未能解决你的问题,请参考以下文章

如何使用Android Studio解决抖动中的gradle错误?

最新版Android Studio 创建JNI教程

如何解决“在Android独立路径中找到多个文件'project.properties'”Android Studio 3.0 Beta-6中的错误

如何开启解决android studio的模拟器的问题

如何解决Android studio生成javadoc文件乱码

如何安全地更改 Android Studio 中的项目名称?