安装最新的Android Studio v3.1.1后的模拟器

时间:2018-04-17 07:40:10

标签: android nullpointerexception

我已删除 Android Studio v2.1 已安装版本3.1.1,但安装后,我尝试使用模拟器运行代码,但是, LogCat部分中发生以下错误。请问有什么解决办法吗?我认为这与我安装的操作系统的用户名有些相关。

04-17 15:23:49.644 1267-1305/? E/vold: Failed to prepare /data/system/users/0: No such file or directory
    Failed to prepare user 0 storage
04-17 15:23:49.802 1313-1313/? E/libEGL: load_driver(/system/lib/egl/libGLES_emulation.so): dlopen failed: library "/system/lib/egl/libGLES_emulation.so" not found
04-17 15:23:49.809 1267-1322/? E/Cryptfs: Bad magic for real block device /dev/block/vdd
04-17 15:23:49.859 1313-1313/? E/SurfaceFlinger: hwcomposer module not found
04-17 15:23:49.885 1313-1313/? E/eglCodecCommon: glUtilsParamSize: unknow param 0x000082da
04-17 15:23:49.885 1267-1305/? E/vold: Failed to chmod /data/system_ce/0: No such file or directory
04-17 15:23:49.885 1313-1313/? E/eglCodecCommon: glUtilsParamSize: unknow param 0x00008cdf
04-17 15:23:49.885 1267-1305/? E/vold: Failed to chmod /data/misc_ce/0: No such file or directory
    Failed to chmod /data/media/0: No such file or directory
04-17 15:23:49.885 1313-1313/? E/eglCodecCommon: glUtilsParamSize: unknow param 0x00008824
04-17 15:23:50.771 1313-1320/? E/SurfaceFlinger: ro.sf.lcd_density must be defined as a build property
04-17 15:23:50.994 1341-1346/? E/libEGL: load_driver(/system/lib/egl/libGLES_emulation.so): dlopen failed: library "/system/lib/egl/libGLES_emulation.so" not found
04-17 15:24:06.261 1435-1435/? E/EmulatedCamera_Factory: 0 cameras are being emulated. 0 of them are fake cameras.
04-17 15:24:06.261 1435-1435/? E/CameraService: setUpVendorTags: Vendor tag operations not fully defined. Ignoring definitions.
04-17 15:24:06.348 1434-1434/? E/RadioService: couldn't load radio module radio.primary (No such file or directory)
04-17 15:24:06.348 1434-1434/? E/SoundTriggerHwService: couldn't load sound trigger module sound_trigger.primary (No such file or directory)
04-17 15:24:09.611 1686-1686/? E/PowerManagerService-JNI: Couldn't load power module (No such file or directory)
04-17 15:24:09.629 1313-1323/? E/SurfaceFlinger: ro.sf.lcd_density must be defined as a build property
04-17 15:24:09.796 1686-1686/? E/art: DexFile_getDexOptNeeded file '/system/framework/org.apache.http.legacy.jar' does not exist
04-17 15:24:16.377 1686-1686/? E/PackageManager: There should probably be exactly one verifier; found []
04-17 15:24:16.446 1686-1705/? E/BatteryStatsService: power: gPowerModule not loaded
04-17 15:24:16.477 1686-1700/? E/KernelCpuSpeedReader: Failed to read cpu-freq: /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state (No such file or directory)
04-17 15:24:16.478 1686-1700/? E/KernelUidCpuTimeReader: Failed to read uid_cputime: /proc/uid_cputime/show_uid_stat (No such file or directory)
04-17 15:24:16.695 1686-1686/? E/ActivityThread: Failed to find provider info for settings
04-17 15:24:16.714 1686-1686/? E/System: ******************************************
04-17 15:24:16.736 1686-1686/? E/System: ************ Failure starting core service
    java.lang.NullPointerException: Attempt to invoke interface method 'android.os.Bundle android.content.IContentProvider.call(java.lang.String, java.lang.String, java.lang.String, android.os.Bundle)' on a null object reference
        at android.provider.Settings$NameValueCache.getStringForUser(Settings.java:1625)
        at android.provider.Settings$Secure.getStringForUser(Settings.java:4259)
        at android.provider.Settings$Secure.getIntForUser(Settings.java:4329)
        at android.provider.Settings$Secure.getInt(Settings.java:4319)
        at com.android.server.am.CoreSettingsObserver.populateSettings(CoreSettingsObserver.java:121)
        at com.android.server.am.CoreSettingsObserver.sendCoreSettings(CoreSettingsObserver.java:77)
        at com.android.server.am.CoreSettingsObserver.<init>(CoreSettingsObserver.java:62)
        at com.android.server.am.ActivityManagerService.installSystemProviders(ActivityManagerService.java:11335)
        at com.android.server.SystemServer.startOtherServices(SystemServer.java:583)
        at com.android.server.SystemServer.run(SystemServer.java:326)
        at com.android.server.SystemServer.main(SystemServer.java:211)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
04-17 15:24:16.872 1686-1686/? E/ActivityThread: Failed to find provider info for settings
04-17 15:24:16.873 1686-1686/? E/System: ******************************************
04-17 15:24:16.875 1686-1686/? E/System: ************ Failure starting system services
    java.lang.RuntimeException: Failed to create service com.android.server.InputMethodManagerService$Lifecycle: service constructor threw an exception
        at com.android.server.SystemServiceManager.startService(SystemServiceManager.java:103)
        at com.android.server.SystemServer.startOtherServices(SystemServer.java:667)
        at com.android.server.SystemServer.run(SystemServer.java:326)
        at com.android.server.SystemServer.main(SystemServer.java:211)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
     Caused by: java.lang.reflect.InvocationTargetException
        at java.lang.reflect.Constructor.newInstance0(Native Method)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:430)
        at com.android.server.SystemServiceManager.startService(SystemServiceManager.java:92)
        at com.android.server.SystemServer.startOtherServices(SystemServer.java:667) 
        at com.android.server.SystemServer.run(SystemServer.java:326) 
        at com.android.server.SystemServer.main(SystemServer.java:211) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756) 
     Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'android.os.Bundle android.content.IContentProvider.call(java.lang.String, java.lang.String, java.lang.String, android.os.Bundle)' on a null object reference
        at android.provider.Settings$NameValueCache.getStringForUser(Settings.java:1625)
        at android.provider.Settings$Secure.getStringForUser(Settings.java:4259)
        at com.android.internal.inputmethod.InputMethodUtils$InputMethodSettings.getString(InputMethodUtils.java:997)
        at com.android.internal.inputmethod.InputMethodUtils$InputMethodSettings.getEnabledInputMethodsStr(InputMethodUtils.java:1178)
        at com.android.internal.inputmethod.InputMethodUtils$InputMethodSettings.getEnabledInputMethodsAndSubtypeListLocked(InputMethodUtils.java:1100)
        at com.android.internal.inputmethod.InputMethodUtils$InputMethodSettings.getEnabledInputMethodListLocked(InputMethodUtils.java:1044)
        at com.android.internal.inputmethod.InputMethodUtils$InputMethodSettings.getExplicitlyOrImplicitlyEnabledInputMethodsAndSubtypeListLocked(InputMethodUtils.java:1438)
        at com.android.internal.inputmethod.InputMethodSubtypeSwitchingController$InputMethodAndSubtypeList.getSortedInputMethodAndSubtypeList(InputMethodSubtypeSwitchingController.java:200)
        at com.android.internal.inputmethod.InputMethodSubtypeSwitchingController.resetCircularListLocked(InputMethodSubtypeSwitchingController.java:575)
        at com.android.internal.inputmethod.InputMethodSubtypeSwitchingController.<init>(InputMethodSubtypeSwitchingController.java:554)
        at com.android.internal.inputmethod.InputMethodSubtypeSwitchingController.createInstanceLocked(InputMethodSubtypeSwitchingController.java:559)
        at com.android.server.InputMethodManagerService.<init>(InputMethodManagerService.java:910)
        at com.android.server.InputMethodManagerService$Lifecycle.<init>(InputMethodManagerService.java:789)
        at java.lang.reflect.Constructor.newInstance0(Native Method) 
        at java.lang.reflect.Constructor.newInstance(Constructor.java:430) 
        at com.android.server.SystemServiceManager.startService(SystemServiceManager.java:92) 
        at com.android.server.SystemServer.startOtherServices(SystemServer.java:667) 
        at com.android.server.SystemServer.run(SystemServer.java:326) 
        at com.android.server.SystemServer.main(SystemServer.java:211) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756) 
04-17 15:24:16.876 1686-1686/? E/AndroidRuntime: *** FATAL EXCEPTION IN SYSTEM PROCESS: main
    java.lang.RuntimeException: Failed to create service com.android.server.InputMethodManagerService$Lifecycle: service constructor threw an exception

1 个答案:

答案 0 :(得分:0)

试图删除整个android工作室并重新安装,但仍然失败了,我已经熟悉了模拟器和主机操作系统属性的一些属性!

1。)C:\ Users \ user \ AppData \ Local \ Android \ sdk \ platform-tools&gt; adb shell getprop |找到手指 2.)Nexus_5X_API_24:5554

3。)Windows 10 Home: