“设置”应用程序将在模拟器上使用干净的Android 8版本(aosp_x86-eng)打开后立即崩溃。 logcat
输出如下:
--------- beginning of main
1536 1550 E memtrack: Couldn't load memtrack module
1536 1550 W android.os.Debug: failed to get memory consumption info: -1
--------- beginning of system
1536 1548 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.android.settings/.Settings (has extras)} from uid 10013
1373 2321 W audio_hw_generic: Not supplying enough data to HAL, expected position 926726 , only wrote 926722
2477 2477 W zygote : Unexpected CPU variant for X86 using defaults: x86
1536 1548 I ActivityManager: Start proc 2477:com.android.settings/1000 for activity com.android.settings/.Settings
2477 2477 I zygote : The ClassLoaderContext is a special shared library.
2477 2477 D OpenGLRenderer: HWUI GL Pipeline
2477 2477 W TileUtils: Found com.android.settings.backup.BackupSettingsActivity for intent Intent { act=com.android.settings.action.SETTINGS pkg=com.android.settings } missing metadata com.android.settings.category
2477 2477 D ConditionManager: conditions loading asychronously
2477 2496 D ConditionManager: loading conditions from xml
2477 2495 E BluetoothAdapter: Bluetooth binder is null
2477 2495 V NFC : this device does not have NFC support
1388 1836 E SurfaceFlinger: ro.sf.lcd_density must be defined as a build property
2477 2500 D SuggestionParser: Day 0 for com.android.settings.suggested.category.FIRST_IMPRESSION
2477 2495 D BatteryInfo: time to make batteryStatsHelper: 1ms
1536 1554 I WifiService: requestActivityInfo uid=1000
1536 1554 I WifiService: reportActivityInfo uid=1000
1536 1554 I WifiService: getSupportedFeatures uid=1000
1536 1606 W HalDeviceManager: isWifiStarted called but mWifi is null!?
2477 2500 I SuggestionParser: Use fingerprint requires unavailable feature android.hardware.fingerprint
1536 1554 E BluetoothAdapter: Bluetooth binder is null
1536 1554 E BatteryExternalStatsWorker: no controller energy info supplied for wifi
1536 1554 E KernelCpuSpeedReader: Failed to read cpu-freq: /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state (No such file or directory)
1536 1554 E BatteryExternalStatsWorker: modem info is invalid: ModemActivityInfo{ mTimestamp=0 mSleepTimeMs=0 mIdleTimeMs=0 mTxTimeMs[]=[0, 0, 0, 0, 0] mRxTimeMs=0 mEnergyUsed=0}
2477 2500 I SuggestionParser: Add another fingerprint requires unavailable feature android.hardware.fingerprint
2477 2495 D BatteryInfo: time for getStats: 10ms
2477 2500 W TileUtils: Found com.android.settings.backup.BackupSettingsActivity for intent Intent { act=com.android.settings.action.SETTINGS pkg=com.android.settings } missing metadata com.android.settings.category
1643 1852 D EGL_emulation: eglMakeCurrent: 0x945dab60: ver 2 0 (tinfo 0x945e4970)
1380 1380 D gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 1540096
1380 1525 D gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 1540096
2477 2499 D : HostConnection::get() New Host Connection established 0xa750eb00, tid 2499
2477 2499 I zygote : android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
2477 2499 I OpenGLRenderer: Initialized EGL, version 1.4
2477 2499 D OpenGLRenderer: Swap behavior 1
2477 2500 E SystemServiceRegistry: No service published for: wifip2p
2477 2500 E SystemServiceRegistry: android.os.ServiceManager$ServiceNotFoundException: No service published for: wifip2p
2477 2500 E SystemServiceRegistry: at android.os.ServiceManager.getServiceOrThrow(ServiceManager.java:75)
2477 2500 E SystemServiceRegistry: at android.app.SystemServiceRegistry$49.createService(SystemServiceRegistry.java:569)
2477 2500 E SystemServiceRegistry: at android.app.SystemServiceRegistry$49.createService(SystemServiceRegistry.java:567)
2477 2500 E SystemServiceRegistry: at android.app.SystemServiceRegistry$StaticServiceFetcher.getService(SystemServiceRegistry.java:987)
2477 2500 E SystemServiceRegistry: at android.app.SystemServiceRegistry.getSystemService(SystemServiceRegistry.java:914)
2477 2500 E SystemServiceRegistry: at android.app.ContextImpl.getSystemService(ContextImpl.java:1667)
2477 2500 E SystemServiceRegistry: at android.view.ContextThemeWrapper.getSystemService(ContextThemeWrapper.java:171)
2477 2500 E SystemServiceRegistry: at android.app.Activity.getSystemService(Activity.java:5915)
2477 2500 E SystemServiceRegistry: at com.android.settings.wfd.WifiDisplaySettings.isAvailable(WifiDisplaySettings.java:216)
2477 2500 E SystemServiceRegistry: at com.android.settings.SettingsActivity.doUpdateTilesList(SettingsActivity.java:845)
2477 2500 E SystemServiceRegistry: at com.android.settings.SettingsActivity.-wrap0(Unknown Source:0)
2477 2500 E SystemServiceRegistry: at com.android.settings.SettingsActivity$5.run(SettingsActivity.java:747)
2477 2500 E SystemServiceRegistry: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
2477 2500 E SystemServiceRegistry: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
2477 2500 E SystemServiceRegistry: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
2477 2500 E SystemServiceRegistry: at java.lang.Thread.run(Thread.java:764)
1536 1548 W ActivityManager: Force finishing activity com.android.settings/.Settings
1536 1552 I ActivityManager: Showing crash dialog for package com.android.settings u0
似乎崩溃与WiFi有某种关系,但Android模拟器无论如何都不应该支持WiFi。这可能是什么问题?
答案 0 :(得分:3)
我自己设法解决了这个问题。该问题似乎是由于import re
samplecode='''
1asd 2asd as3d 4 asd5asd'''
codes = re.findall(r'\d{1,2}',samplecode)
codes = list(map(int,codes))
keys = {1:'a',2:'b',3:'c',4:'d',5:'e',6:'f',7:'g',8:'h',9:'i',10:'j'}
decodedlist=[]
for i in codes:
decodedlist.append(keys[codes[i-1]])
decodedstr=''.join(decodedlist)
print(decodedstr)
报告WiFi可用,而com.android.settings.wfd.WifiDisplaySettings.isAvailable
服务不存在。我转到wifip2p
并将此检查替换为WifiDisplaySettings.java:216
,因此它不会尝试找到该服务。现在可以正常打开设置。
答案 1 :(得分:3)
更改
中的WifiDisplaySettings.java
/YoutAospRoot/packages/apps/Settings/src/com/android/settings/wfd/WifiDisplaySettings.java
更改代码段
public static boolean isAvailable(Context context) {
return context.getSystemService(Context.DISPLAY_SERVICE) != null
&& context.getSystemService(Context.WIFI_P2P_SERVICE) != null;
}
收件人
public static boolean isAvailable(Context context) {
return false;
}
然后
make systemimage
答案 2 :(得分:1)
也许这也可以帮上忙。我注意到,使用 Office.context.mailbox.item.body.setAsync(newHtml, { coercionType: Office.CoercionType.Html });
});
setAsync method not a function error getting.
而非lunch aosp_x86-userdebug
构建干净的Android 8时,“设置”应用程序不会崩溃。