android px转dp26px是多少dp

上海巴图姆工业设备有限公司
类型:其他
联系人:张先生
电话:86-021-
传真:86-021-
联系我时,请说明是在中国化工仪器网上看到的,谢谢
主营产品:美国ASCO电磁阀,德国BURKERT宝德,德国FESTO费斯托,日本SMC,日本CKD喜开理, 德国IFM易福门,日本KOGANEI小金井,日本SUNX神视,日本KEYENCE基恩士,德国PILZ皮尔兹 德国SIEMENS等品牌的系列产品
主营业务:主营工业自动化设备、传感器、电磁阀、气动元件、气缸、传动机械设备、工业电器、气动液压设备、仪器仪表和化学试剂等
该商家其它产品
其它商家同类产品两天热门文章
最新推荐文章2048源码(核心算法有,缺少几个anctionbar,以后补上) - 不懂事的小屁孩 - ITeye技术网站
博客分类:
2048游戏基本上有四部分组成,
1:主activity,包含游戏块的16个方格,上面统计分数的模块
2:底下的gridview,监听上下左右的滑动,进行事件处理,
3:每一个卡片,里面的内容很简单,只有一个text,记录显示的数字
4:Actionbar,是游戏用重新开始,设置等功能(这个在底下可以下载的代码里面还没有实现)
写代码的流程
1:设计游戏的布局,基本是两块,上面是分数模块,下面是gridview
2:代码实现gridview(组合控件)
3:判断处理使gridview可以监听上下左右滑动的事件
4:实现gridview中的card类,里面就是一个textview(组合控件)
5:在gridview中添加card
6:在游戏的初始时随机添加两个数字
7:实现游戏逻辑,进行上下左右的事件处理
8:计分,实现上面分数统计的模块
9:检查游戏结束
10:优化处理,不同数字具有不同的颜色
11:添加动画效果,我的其他文章中有专门对动画进行的阐述
12:添加anctionbar继续进行优化
主activity的页面布局:activity_main.xml
&LinearLayout xmlns:android="/apk/res/android"
xmlns:tools="/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#EAEAEE"
tools:context=".MainActivity" &
&RelativeLayout
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="5" &
&LinearLayout
android:layout_marginLeft="30dp"
android:layout_marginTop="30dp"
android:layout_marginBottom="30dp"
android:layout_width="120dp"
android:layout_height="250dp"
android:background="@drawable/yellowrounded_half_bg"&
android:id="@+id/now_most_score"
android:gravity="center"
android:layout_width="fill_parent"
android:textSize="80px"
android:textColor="#FFFFFF"
android:textStyle="bold"
android:layout_height="100dp" /&
&/LinearLayout&
&LinearLayout
android:layout_marginLeft="170dp"
android:layout_marginTop="5dp"
android:layout_width="80dp"
android:layout_height="80dp"
android:orientation="vertical"
android:background="@drawable/orangerounded_half_bg"&
android:layout_width="fill_parent"
android:textSize="26px"
android:text="@string/score"
android:textColor="#FF6666"
android:textStyle="bold"
android:layout_height="40dp" /&
android:id="@+id/now_all_score"
android:layout_width="fill_parent"
android:textSize="26px"
android:textColor="#FFFFFF"
android:textStyle="bold"
android:text="0"
android:layout_height="40dp" /&
&/LinearLayout&
&LinearLayout
android:layout_marginLeft="265dp"
android:layout_marginTop="5dp"
android:layout_width="80dp"
android:orientation="vertical"
android:layout_height="80dp"
android:background="@drawable/orangerounded_half_bg"&
android:layout_width="fill_parent"
android:textSize="26px"
android:text="@string/main_score"
android:textColor="#FF6666"
android:textStyle="bold"
android:layout_height="40dp" /&
android:id="@+id/history_most_score"
android:layout_width="fill_parent"
android:textSize="26px"
android:text="0"
android:textColor="#FFFFFF"
android:textStyle="bold"
android:layout_height="40dp" /&
&/LinearLayout&
&ImageView
android:layout_marginLeft="265dp"
android:layout_marginTop="105dp"
android:layout_width="80dp"
android:layout_height="80dp"
android:background="@drawable/sf"
&LinearLayout
android:layout_marginLeft="170dp"
android:layout_marginTop="105dp"
android:layout_width="80dp"
android:layout_height="80dp"
android:orientation="vertical"
android:background="@drawable/orangerounded_half_bg"&
android:layout_width="fill_parent"
android:textSize="26px"
android:text="@string/author"
android:textColor="#FF6666"
android:textStyle="bold"
android:layout_height="40dp" /&
android:layout_width="fill_parent"
android:textSize="26px"
android:textColor="#FFFFFF"
android:textStyle="bold"
android:text="@string/author_name"
android:layout_height="40dp" /&
&/LinearLayout&
&/RelativeLayout&
&com.example.game2048.MyGridView
android:id="@+id/girdlayout"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="9"
&/com.example.game2048.MyGridView&
&/LinearLayout&
MainActivity.java
package com.example.game2048;
import android.app.A
import android.content.SharedP
import android.os.B
import android.widget.TextV
public class MainActivity extends Activity {
private TextView now_most_score,now_all_score,history_most_
private int most_score =
0 , all_score = 0;
private static MainA
public MainActivity() {
mainactivity =
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
now_most_score = (TextView) findViewById(R.id.now_most_score);
now_all_score = (TextView) findViewById(R.id.now_all_score);
history_most_score = (TextView) findViewById(R.id.history_most_score);
public static MainActivity getMainActivity(){
public void clearScore(){
most_score =
all_score = 0;
showScore();
private void showScore(){
SharedPreferences mySharedPreferences= getSharedPreferences("my2048", Activity.MODE_PRIVATE);
SharedPreferences.Editor editor = mySharedPreferences.edit();
now_most_score.setText( most_score + "");
now_all_score.setText( all_score + "");
history_most_score.setText(mySharedPreferences.getInt("his_score", 0)+"");
if(all_score & Integer.parseInt(history_most_score.getText().toString()) ){
history_most_score.setText(all_score+"");
editor.putInt("his_score", all_score);
//提交当前数据
public void addScore(int p,int s){
most_score =
all_score +=
showScore();
MyGridView.java
package com.example.game2048;
import java.util.ArrayL
import java.util.L
import android.app.AlertD
import android.content.C
import android.content.DialogI
import android.graphics.P
import android.util.AttributeS
import android.view.MotionE
import android.view.V
import android.widget.GridL
public class MyGridView extends GridLayout {
private MyCard[][] cards = new MyCard[4][4];
private List&Point& emptyPoints = new ArrayList&Point&();
public MyGridView(Context context) {
super(context);
initGame();
public MyGridView(Context context, AttributeSet attrs) {
super(context, attrs);
initGame();
public MyGridView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
initGame();
private void initGame(){
setColumnCount(4);
setBackgroundColor(0xffFAF9DE);
setBackground(getResources().getDrawable(R.drawable.bk_pq));
setOnTouchListener(new OnTouchListener() {
private float startx,starty,offerx,
public boolean onTouch(View arg0, MotionEvent arg1) {
switch (arg1.getAction()) {
case MotionEvent.ACTION_DOWN:
startx = arg1.getX();
starty = arg1.getY();
case MotionEvent.ACTION_UP:
offerx = arg1.getX() -
offery = arg1.getY() -
if(Math.abs(offerx) & Math.abs(offery)){
//横向偏移量大
if(offerx & 5){
moveright();
}else if(offerx & -5){
moveleft();
//纵向偏移量大
if(offery & 5){
movedown();
}else if(offery & -5){
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
int cardwidth = (Math.min(w, h)-10)/4;
addCard(cardwidth,cardwidth);
startGanme();
private void startGanme() {
for (int y = 0; y & 4; y++) {
for (int x = 0; x & 4; x++) {
cards[x][y].setNum(0);
addRandom();
addRandom();
showScore(0);
private void addCard(int cardWidth, int cardHeight) {
for (int y = 0; y & 4; y++) {
for (int x = 0; x & 4; x++) {
c = new MyCard(getContext());
c.setNum(2);
addView(c, cardWidth, cardHeight);
cards[x][y] =
private void addRandom(){
emptyPoints.clear();
for (int y = 0; y & 4; y++) {
for (int x = 0; x & 4; x++) {
if(cards[x][y].getNum()&=0){
emptyPoints.add(new Point(x, y));
cards[x][y].setBackGroundColor(cards[x][y].getNum());
Point p = emptyPoints.remove((int)(Math.random()*emptyPoints.size()));
cards[p.x][p.y].setNum(Math.random()&0.1?2:4);
private void moveup(){
boolean flag =
for (int x = 0; x & 4; x++) {
for (int y = 0; y & 4; y++) {
for (int y1 = y+1; y1 & 4; y1++) {
if(cards[x][y1].getNum() & 0){
if (cards[x][y].getNum()&=0) {
cards[x][y].setNum(cards[x][y1].getNum());
cards[x][y1].setNum(0);
}else if (cards[x][y].equals(cards[x][y1])){
cards[x][y].setNum(cards[x][y].getNum()*2);
cards[x][y1].setNum(0);
showScore(cards[x][y].getNum());
addRandom();
if(checkComplete()){
showAgainDialog();
private void movedown(){
boolean flag =
for (int x = 0; x & 4; x++) {
for (int y = 3; y &= 0; y--) {
for (int y1 = y-1; y1 &= 0; y1--) {
if(cards[x][y1].getNum() & 0){
if (cards[x][y].getNum()&=0) {
cards[x][y].setNum(cards[x][y1].getNum());
cards[x][y1].setNum(0);
}else if (cards[x][y].equals(cards[x][y1])){
cards[x][y].setNum(cards[x][y].getNum()*2);
cards[x][y1].setNum(0);
showScore(cards[x][y].getNum());
addRandom();
if(checkComplete()){
showAgainDialog();
private void moveleft(){
boolean flag =
for (int y = 0; y & 4; y++) {
for (int x = 0; x & 4; x++) {
for (int x1 = x+1; x1 & 4; x1++) {
if(cards[x1][y].getNum() & 0){
if (cards[x][y].getNum()&=0) {
cards[x][y].setNum(cards[x1][y].getNum());
cards[x1][y].setNum(0);
}else if (cards[x][y].equals(cards[x1][y])){
cards[x][y].setNum(cards[x][y].getNum()*2);
cards[x1][y].setNum(0);
showScore(cards[x][y].getNum());
addRandom();
if(checkComplete()){
showAgainDialog();
private void moveright(){
boolean flag =
for (int y = 0; y & 4; y++) {
for (int x = 3; x &= 0 ; x--) {
for (int x1 = x-1; x1 &= 0; x1--) {
if(cards[x1][y].getNum() & 0){
if (cards[x][y].getNum()&=0) {
cards[x][y].setNum(cards[x1][y].getNum());
cards[x1][y].setNum(0);
}else if (cards[x][y].equals(cards[x1][y])){
cards[x][y].setNum(cards[x][y].getNum()*2);
cards[x1][y].setNum(0);
showScore(cards[x][y].getNum());
addRandom();
if(checkComplete()){
showAgainDialog();
private void showAgainDialog() {
new AlertDialog.Builder(getContext()).setTitle("Loser").setMessage("Again").setPositiveButton("Again", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface arg0, int arg1) {
startGanme();
}).show();
private boolean checkComplete() {
for (int y = 0; y & 4; y++) {
for (int x = 0; x & 4 ; x++) {
if(cards[x][y].getNum()==0 ||
(x & 0 && cards[x-1][y].equals(cards[x][y])) ||
(x & 3 && cards[x+1][y].equals(cards[x][y])) ||
(y & 0 && cards[x][y-1].equals(cards[x][y])) ||
(y & 3 && cards[x][y+1].equals(cards[x][y])) ){
private void showScore(int s) {
int large = 0;
for (int y = 0; y & 4; y++) {
for (int x = 0; x & 4 ; x++) {
if(large & cards[x][y].getNum()){
large = cards[x][y].getNum();
MainActivity.getMainActivity().addScore(large,s);
MyCard.java
package com.example.game2048;
import android.content.C
import android.util.AttributeS
import android.view.G
import android.widget.FrameL
import android.widget.TextV
public class MyCard extends FrameLayout {
private int num = 0 ;
private TextV
public MyCard(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
public MyCard(Context context, AttributeSet attrs) {
super(context, attrs);
public MyCard(Context context) {
super(context);
private void init(){
textview = new TextView(getContext());
textview.setTextSize(32);
textview.setGravity(Gravity.CENTER);
textview.setBackgroundColor(0x33ffffff);
LayoutParams lp = new LayoutParams(-1, -1);
lp.setMargins(10, 10, 0, 0);
addView(textview, lp);
setNum(0);
public int getNum(){
public void setNum(int num){
this.num =
if(num&=0){
textview.setText("");
textview.setText(num+"");
public boolean equals(MyCard c){
return getNum() == c.getNum();
public void setBackGroundColor(int num){
switch (num) {
textview.setBackgroundColor(0x33ffffff);
textview.setBackgroundColor(0x33FFFFCC);
textview.setBackgroundColor(0x33FF6666);
textview.setBackgroundColor(0x33FF3300);
textview.setBackgroundColor(0x33FF33FF);
textview.setBackgroundColor(0x330033FF);
textview.setBackgroundColor(0x3366FF66);
textview.setBackgroundColor(0x3300CC33);
textview.setBackgroundColor(0x);
case 1024:
textview.setBackgroundColor(0x33CCCC00);
case 2048:
textview.setBackgroundColor(0x33CC0000);
case 4096:
textview.setBackgroundColor(0x33FFCC99);
case 8192:
textview.setBackgroundColor(0x33FFFF00);
textview.setBackgroundColor(0x33ffffff);
下载次数: 0
不懂事的小屁孩
浏览: 4405 次
呵呵 女孩子么移植android驱动遇到的一些问题和解决43
上亿文档资料,等你来发现
移植android驱动遇到的一些问题和解决43
移植android驱动遇到的一些问题和解决;郑重声明:;(可能有些不是能解决,还请见谅);1、Q:apt-get:commandnotfo;A:先搞清楚自己用的是啥系统吧,如果是ubunt;在Fedora里正确的安装procinfo的方法;就把错误信息贴出来;2、Q:nandflash如何正确分区:;A:(1)MISC分区;其中misc分区信息第一篇文章有解
移植android驱动遇到的一些问题和解决 郑重声明:(可能有些不是能解决,还请见谅)1、Q:apt-get: command not foundA:先搞清楚自己用的是啥系统吧,如果是ubuntu或者debian,去相应的版块问问题,否则,改用yum,Fedora里面找不到apt-get不是什么太奇怪的事情。在Fedora里正确的安装procinfo的方法就是(首先确保你是超级用户),yum install procinfo。你使用的su -c 'yum install procinfo'是正确的,如果装不上,就把错误信息贴出来。2、Q:nandflash如何正确分区:A:(1)MISC分区其中misc分区信息第一篇文章有解释:
保存设备配置信息:CID (Carrier or Region ID),USB和其它硬件设备配置信息,大约20K的样子。(2)recovery分区recovery 分区即恢复分区,在正常分区被破坏后,仍可以进入这一分区进行备份和恢复.我的理解是这个分区保存一个简单的OS或底层软件,在Android的内核被破坏后可以用bootloader从这个分区引导进行操作。(3)boot 分区一般的嵌入式Linux的设备中.bootloader,内核,根文件系统被分为三个不同分区。在Android做得比较复杂,从这个手机分区和来看,这里boot分区是把内核和ramdisk file的根文件系统打包在一起了,是编译生成boot.img来烧录的。它有如下格式。(4)rootfs-combin分区:文件系统分区(5)cache分区:缓存(6)一个分区例子[
2.x0-0x : &misc&[
2.x-0x : &recovery&[
2.x-0x00 : &kernel&[
2.x00-0x0 : &rootfs-combin&[
2.x0-0x : &cache&3、Q:想把自己写的一个flash的驱动程式加载到工程中,而且能够通过menuconfig配置内核时选择该驱动该怎么办呢?A:第一:将您写的nandflash_tast.c 文档添加到/driver/mtd/maps/ 目录下。第二:修改/driver/mtd/maps目录下的kconfig文档:config MTD_nandflash_tasttristate “my flash&这样当make menuconfig时 ,将会出现 my flash选项。第三:修改该目录下makefile文档。添加如下内容:obj-$(CONFIG_MTD_nandflash_tast) += nandflash_tast.o4、Q:修改的地方?A:\arch\arm\mach-s5pc100,原来没有\mach-s5pc100,修改者把led、按键驱动、nandflash分区放置在这个文件夹中5、Q:/root/android/common/drivers/mtd/maps/Makefile:10: *** 未终止的变量引用。 停止。make[2]: *** [drivers/mtd/maps] 错误 2A:obj-$(CONFIG_MTD_flashtest += flashtest.o ,这句少了右边括号6、Q:drivers/mtd/maps/nandflash_tast.c:66: fatal error: plat/regs-nand.h: No such file or directory A:取消电源管理选项7、Q:CC
drivers/usb/gadget/r8a66597-udc.odrivers/usb/gadget/r8a66597-udc.c: In function 'r8a66597_probe':drivers/usb/gadget/r8a66597-udc.c:1585: error: implicit declaration of function 'IS_ERR'drivers/usb/gadget/r8a66597-udc.c:1588: error: implicit declaration of function 'PTR_ERR'make[2]: *** [drivers/usb/gadget/r8a66597-udc.o] 错误 1make[1]: *** [drivers/usb/gadget] 错误 2make: *** [drivers] 错误 2A:取消USB Gadget Support 下的usb Peripheral Controller8、Q:AS
arch/arm/lib/testsetbit.odrivers/video/console/vgacon.c: In function 'vgacon_startup':drivers/video/console/vgacon.c:508: error: 'PCIMEM_BASE' undeclared (first use in this function) drivers/video/console/vgacon.c:508: error: (Each undeclared identifier is reported only once drivers/video/console/vgacon.c:508: error: for each function it appears in.)drivers/video/console/vgacon.c: In function 'vgacon_do_font_op':drivers/video/console/vgacon.c:1068: error: 'PCIMEM_BASE' undeclared (first use in this function) AS
arch/arm/lib/ucmpdi2.omake[3]: *** [drivers/video/console/vgacon.o] 错误 1make[2]: *** [drivers/video/console] 错误 2make[1]: *** [drivers/video] 错误 2A:去除部分:Device Drivers
---&Graphics support
---&Console display driver support
---&[ ] VGA text console&span style=&font-size: 12 font-family: 宋体, A color: rgb(102, 102, 102); line-height: 26&&
&/span&9、Q:cc1:错误:unrecognized command line option ‘-mlittle-endian’cc1: 错误:unrecognized command line option ‘-mno-thumb-interwork’scripts/mod/empty.c:1:0: 错误:ABI (aapcs-linux)未知,-mabi= switchscripts/mod/empty.c:1:0: 错误:-march= switch所带参数(armv5t)不正确A:
是没有找到编译器的执行文件,export CROSS_COMPILE=arm-none-linux-gnueabi-11、Q:CC
arch/arm/common/vic.oarch/arm/common/vic.c:284: error: conflicting types for 'vic_init'/root/android/common/arch/arm/include/asm/hardware/vic.h:44: note: previous declaration of 'vic_init' was heremake[1]: *** [arch/arm/common/vic.o] 错误 112、Q:有的宏定义搜索不出来A:sourceinsight配置keyconfig和makefile14、Q:drivers/input/touchscreen/s3c-ts.c:68: warning: &CONFIG_CPU_FREQ& is not definednet/ethernet/eth.c:402: warning: 'print_mac' is deprecated (declared at net/ethernet/eth.c:397) lib/decompress_bunzip2.c:511: warning: the frame size of 1880 bytes is larger than 1024 bytes15、Q:nandflash分区位置A:arch/arm/plat-s3c/include/plat/partition.h,其数据结构定义在linux/include/partition.h16、Q:nandflash读写问题1A:作者的内核是通过U-BOOT写到Nand Flash的, U-BOOT 通过的软件ECC算法产生ECC校验码, 这与内核校验的ECC码不一样, 内核中的ECC码是由S3C2410中Nand Flash控制器产生的。所以,我在这里选择禁止内核ECC校验。 //此段引用别人的
我只是照此修改了 搜索关键字NAND_ECC_SOFT,在s3c2410_nand_init_chip函数里,修改NAND_ECC_SOFT为NAND_ECC_NONE17、Q:drivers/video/s3c-fb.c:26: fatal error: mach/regs-fb.h: No such file or directory compilation terminated. A:&mach/regs-fb.h&不能直接用,改成&plat/regs-fb.h&18、Q:NAND read: device 0 offset 0x900000, size 0x3000003145728 bytes read: OKBoot with zImagedo not support this address : Starting kernel ......................................................................................自后就不动了,A:启动Location:
-& Kernel hacking
-& Kernel debugging (DEBUG_KERNEL [=y])
-& Debug object operations (DEBUG_OBJECTS [=n])选择调试开关:Kernel low-level debugging functions
│ ││ │
Kernel low-level debugging via EmbeddedICE DCC channel19、Q:烧写进文件系统过后,不能重新烧写zImageA:需要在进入时按下enter键进入SMDK100#命令控制,然后输入dnw 20、Q:
arch/arm/boot/compressed/../../../../lib/inflate.c:1286: error: section attribute cannot be specified for local variablesarch/arm/boot/compressed/../../../../lib/inflate.c:1287: error: section attribute cannot be specified for local variablesarch/arm/boot/compressed/../../../../lib/inflate.c:1288: error: section attribute cannot be specified for local variablesarch/arm/boot/compressed/../../../../lib/inflate.c:1291: error: section attribute cannot be specified for local variablesarch/arm/boot/compressed/../../../../lib/inflate.c:1295: error: section attribute cannot be specified for已经找到原因:KFT的profile all if conditionals的原因,去掉就行。21、Q:
&1&Unable to handle kernel NULL pointer dereference at virtual address 0000007c&1&pgd = c0004000&1&[0000007c] *pgd=&0&Internal error: Oops: 5 [#1]&0&last sysfs file:&d&Modules linked in:CPU: 0
Not tainted
(2.6.32.9-0bc63-dirty #26)PC is at device_for_each_child+0x10/0x70LR is at i2c_check_addr+0x28/0x34A:
i2c_check_addr函数对相应的地址访问或修改非法,???????\include\linux\i2c.h,137行添加:Symbol: S5PC1XX_SETUP_I2C0 [=y]
│ Symbol: S5PC1XX_SETUP_I2C1 [=y]取消--Kconfig (arch\arm\plat-s5pc1xx):47config S5PC1XX_SETUP_I2C0booldefault y(改成:default n)config S5PC1XX_SETUP_I2C1booldefault y(改成:default n)取消--\arch\arm\mach-s5pc100\Kconfig,注释掉:#select S3C_DEV_I2C122、Q:VFS: Cannot open root device &mtdblock2& or unknown-block(2,0)A:文件系统没有选择正确23、报错:&3&init: untracked pid 3479 exited&3&init: untracked pid 3494 exited处理:取消选中:& &
NFS client support24,有个选项没发现处理:Boot options--&()
Default kernel command stringCONFIG_CMDLINE=&root=/dev/mtdblock2 rootfstype=cramfs init=/linuxrc console=ttySAC2,115200 mem=128M&mem=32M console=ttyS0,115200 initrd=0x5728 root=/dev/arm rwfs/proc/task_mmu.c: In function 'pagemap_read':fs/proc/task_mmu.c:755: warning: ignoring return value of 'copy_to_user', declared with attribute warn_unused_resultfs/yaffs2/yaffs_guts.c:1571: warning: 'yaffs_DeleteWorker' defined but not usedfs/yaffs2/yaffs_guts.c:600: warning: 'yaffs_VerifyTnodeWorker' defined but not used&4&yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found.已取消----\fs\yaffs2\yaffs_fs.c,123行改成:unsigned int yaffs_auto_checkpoint = 2;有建议:从yaffs2文件系统所挂载的分区的开始,到nand flash 的最后,这段空间,都要完全擦除 方法(1)先取消yaffs的编译 & &
YAFFS2 file system support方法(2)修改config MTD_NAND_S3C2410config MTD_NAND_S3C2410_DEBUGconfig MTD_NAND_S3C2410_HWECCconfig MTD_NAND_S3C2410_CLKSTOP原因:这几个选项会覆盖s5pcxx的处理后还是报错,可能是没有重新编译到想应改动的地方。\drivers\video\Kconfig,去掉config FB_S3C,config FB_S3C_DEBUG_REGWRITEbutton未编译,\drivers\input\keyboard\Makefile,添加:obj-$(CONFIG_KEYBOARD_S3C_BUTTON)s3c_button.o好象是android中/system/core/init/init.c中的static int wait_for_one_process(int block)函数中static int wait_for_one_process(int block){pid_struct service *struct socketinfo *time_struct listnode *struct command *while ( (pid = waitpid(-1, &status, block ? 0 : WNOHANG)) == -1 && errno == EINTR );if (pid &= 0) return -1;INFO(&waitpid returned pid %d, status = %08x\n&, pid, status);svc = service_find_by_pid(pid);if (!svc) {ERROR(&untracked pid %d exited\n&, pid);
//这里报的错吧,什么原因呢return 0;}如过是通过generic生成的android,启动时会有如下错误提示:init: untracked pid 1870 exitedinit: untracked pid 1918 exitedinit: untracked pid 1870 exitedinit: untracked pid 1918 exitedinit: untracked pid 1870 exitedinit: untracked pid 1918 exited等 问题,主要是原因是权限问题。文件系统在启动时,被挂载成只读的了。需要在init.rc中将其改变成可读写的。如果我们使用NFS文件系统,则配置文件应如下:/source/
*(rw,sync,no_root_squash) +=包含各类专业文献、高等教育、文学作品欣赏、生活休闲娱乐、中学教育、专业论文、各类资格考试、外语学习资料、移植android驱动遇到的一些问题和解决43等内容。 
  android驱动开发和移植详解_计算机软件及应用_IT/...载体,涉及不同硬件的应用问题,所以需要 做系统移植...报告来自硬件的问题 KERN_WARNING 就可能出现的问题...  (Battery) 电池部分 包括电池部分驱动+电池的硬件抽象层(Android 标准内容) Android 中具有很多组件,但并不是每一个部件都需要移植,对于一些纯软的组件,就没有移...  我把我知道的一些文件的用途说一下: ***Lib/dsp 文件夹 DSP 驱动所在,一般...系统版本等 一般来说只要遵循规律,由少至多移植,不会出现什么问题,出现问题就...  只提供最基本的几个驱动移植方法,谨保证 android ...下面就是进入 该配置选项出现的对话框的情况,有“ ...(ndev); } 注意:还有一个问题,就...  Android 获取到的数据就是驱动上报的原始数据。 方案一 : 移植 TSLIB,通过 ... 当然如果出现了 X,Y 轴相反或者坐标反向等问题都可通过改写这条语句来进行...  也正是由于这个分层的原因,Android 被踢出了Linux 内核主线 代码树中。大家想 想,Android 放在内核空间的驱动程序对硬件的支持是不完整的,把Linux 内核移植到别的...   移植android驱动遇到的一些... 6页 免费 ubuntu下android源码编译修... 3页... 随着苹果对 HTC 专利指控的初审胜诉,Android 终于因为专利问题触到了霉头。面对...   移植Android到mini2440_IT/计算机_专业资料。这是一份详细描述将Android移植到...用键盘上的键好像没作用 触摸屏问题解决思路: (一) 在 mini2440 触摸屏驱动...

我要回帖

更多关于 android dp dip 区别 的文章

 

随机推荐