文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>android模拟器上如何使调整亮度有效

android模拟器上如何使调整亮度有效

时间:2009-06-05  来源:figofuture

android1.1及以前在模拟器上调整亮度和关闭屏幕没有问题,但自从更新到了1.5版本,这个功能就有问题了,原因是模拟器的模拟机制作了相应的调整。解决方案如下: 首先,利用adb将lights.goldfish.so从sdk中拉出,因为sdk中这个功能可以正常运行,但自己从源代码编译出来的image因为缺乏这个文件就有问题了; 接着,将lights.goldfish.so拷贝至源代码某一目录下; 然后,在这个目录下编写如下makefile: # Copyright (C) 2009 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

LOCAL_PATH := $(call my-dir)

ifneq ($(TARGET_PRODUCT),sim)
# HAL module implemenation, not prelinked and stored in
# hw/<SENSORS_HARDWARE_MODULE_ID>.<ro.hardware>.so
include $(CLEAR_VARS)

LOCAL_PRELINK_MODULE := false

LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw

LOCAL_MODULE := lights.goldfish.so

LOCAL_MODULE_TAGS := debug

LOCAL_MODULE_CLASS := SHARED_LIBRARIES

LOCAL_SRC_FILES := $(LOCAL_MODULE)

include $(BUILD_PREBUILT)
endif
最后,编译源代码。
  运行模拟器,是不是发现调整亮度和关闭屏幕功能是不是又恢复正常了。  
相关阅读 更多 +
排行榜 更多 +
超级冒险王安卓版

超级冒险王安卓版

休闲益智 下载
玩具小镇手机版

玩具小镇手机版

休闲益智 下载
这一关特上头手机版

这一关特上头手机版

休闲益智 下载