android编程中程序没错,其app运行不了

Failed to find style 'textStyle' in current theme?
Failed to find style 'buttonStyle' in current theme?
Failed to find style 'editTextStyle' in current theme?
Failed to find style 'swichStyle' in current theme
?
怎么解决?求大神

0

8个回答

是否是端口占用的问题?也可能是ecplise的问题,ecplise有很多漏洞的。如果前面的问题你重启电脑,就可以消除端口占用的问题,后面重启ecplise就可以了。 当然大前提是代码无错误。

0
qq_34224279
qq_34224279 我重启过,还是有问题,不知道啊,求解
3 年多之前 回复

找一下你的styles文件,看看里面这些theme是不是定义了。

0
qq_34224279
qq_34224279 怎么定义?
3 年多之前 回复

兄弟,你的Styles文件找不到,看看有没有导入进去

0
qq_34224279
qq_34224279 怎么导进去?求教
3 年多之前 回复

Failed to find style 'textStyle' in current theme?
Failed to find style 'buttonStyle' in current theme?
Failed to find style 'editTextStyle' in current theme?
Failed to find style 'swichStyle' in current theme

去res下的value下的style文件里找找 你是不是有这几个style

0

感觉是support包版本太高

0
qq_34224279
qq_34224279
3 年多之前 回复

不是adb接口被占用就是手机内存不够

0
qq_34224279
qq_34224279 怎么解决?求代
3 年多之前 回复

adb接口被占用:关闭IDE,任务管理器关闭adb,重启IDE

手机内存不够:换一台手机

0
qq_34224279
qq_34224279 已经试过了,但是还是一样,我把不用的都关了,然后还是一样。
3 年多之前 回复

你看看权限有没有添加

0
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
编译没错,运行不了?
我在C-FREE编译系统下写的程序,判断是否回文,不知道为什么能进行编译,但就不能运行,0错误,0警告,郁闷,高手帮忙看下,顺便指出下我的错误,谢谢rn#includern#includern#define N 10rnvoid mian()rnrn char str[N],*p,t,str1[N];rn int i;rn p=str;rn printf("Enter the string:");rn gets(str);rn for(i=0;i
为什么我的程序没错却运行不了
我在对话框里加了一个RICHEDIT控件,但加了之后编译程序显示没错,但运行不了(没有对话框出来),但删除那个控件后就可以了,请问为什么?谢谢!
截图代码没错,可就运行不了Wscript.Shell运行截图程序
我把一个媒体文件转换成flv以后,然后用flv2jpg.exe进行截图,但是无论怎么样都没成功,用ffmpeg也是这样,代码如下:rnrnrnstreamPath=Server.MapPath("../upload/flv/"&ufp&".flv")rnSaveImgPath = server.mappath("../upload/videoimages/"&ufp&".jpg")rnexestr=Server.mappath("../app/flv2jpg/flv2jpg.exe")rnimgW ="120" rnimgY = "90" rnimgQuality = "100" rnrnrnexestr=exestr&" "&streamPath&" "&SaveImgPath&" "&imgW&" "&imgY&" "&imgQualityrnSet imgShell = server.CreateObject("Wscript.Shell")rnimgState = imgShell.Run(exestr,1,FALSE)rnif imgState <> 0 Then rn Response.write " 命令执行失败!权限不够或者该程序无法运行" rnend if rnrnSet imgShell = Nothing rnrn------------------------------------------------------------rn我曾经在这行插入rnexestr=exestr&" "&streamPath&" "&SaveImgPath&" "&imgW&" "&imgY&" "&imgQualityrnresponse.Write exestrrnresponse.end()rnrn查看结果。把显示出来的信息复制到windows 开始-运行里面测试,没有问题,可以在FLV里截图,可在程序里就不可以转换。rnrn没有任何显示错误,网站权限已经打开,我是根据这段代码前面一个调用wscript.shell正常判断出来的。
这个程序在android studio中运行不了;
[code=java][/code]rnpackage jj;rnrnclass Structrn int age;rn String name;rn int maths;rn int English;rn int Chinese;rnrn double tal(int c,int m,int e)rn this.Chinese=c;rn this.maths=m;rn this.English=e;rn return c+m+e;rn rn double average(int c,int m,int e)rn this.Chinese=c;///this的三种用法之一------1对类中成员变量的引用,而非函数参数;rn this.maths=m;rn this.English=e;rn return (c+m+e)/3.0d;//rnrn rnrnrnrnpublic class lll rn public static void main(String[] args) rn int s=93, t=78, z=84;//java中使用变量时需要赋初值;rnrn Struct a;rn a=new Struct();rn a.age=23;rn a.name="张三";rn a.Chinese=93;rn a.English=78;rn a.maths=84;rn a.average( s, t, z);rn a.tal(s, t ,z);rnrnrn System.out.println(" 姓名:"+a.name+" 年龄:"+a.age);rn System.out.println(" ");rnrn System.out.println(" 三门课的总成绩="+a.tal(s, t, z));rn System.out.println(" 三门课的平均成绩="+a.average(s, t,z));rnrnrnrn rnrn
命令行运行 android app程序
am start -a android.intent.action.VIEW -d file:///sdcard/Music/168.amr -t audio/* & 在Android中,除了从界面上启动程序之外,还可以从命令行启动程序,使用的是命令行工具am.   usage: am [subcommand] [options]     start an Activity:
VC++ 6.0的问题,代码没错,运行不了
用C写了个程序,要打开文件,当没有创建该文件时,运行正常,只是提示没找到。但是创建了文件后,在运行就抽搐了nBL *Creat()nBL *p,*q;n int j=1;n char ch[5]="end";n FILE *fp;n fp=fopen("busline.txt","r+");n if(fp==NULL)n printf("不能打开此文件!");n exit(0);n n p=(BL *)malloc(sizeof(BL));n head=p;n q=p;n fscanf(fp,"%d",&(p->busnum));n don fscanf(fp,"%d %s",&(p->stop[j].num),p->stop[j].name);n j++;n while(strcmp(p->stop[j-1].name,ch)==1);n while(!feof(fp))n j=1;n p=(BL *)malloc(sizeof(BL));n q->next=p;n q=p;n fscanf(fp,"%d",&(p->busnum));n don fscanf(fp,"%d %s",&(p->stop[j].num),p->stop[j].name);n j++;n while(strcmp(p->stop[j-1].name,ch)!=0);n n q->next=NULL;n fclose(fp);n return head;n n打开文件的代码n运行后![图片说明](https://img-ask.csdn.net/upload/201605/22/1463920930_11935.png)n或者![图片说明](https://img-ask.csdn.net/upload/201605/22/1463920945_37999.jpg)
字符串操作的错误。编译没错,运行不了
bool Fun(char *str)rnrn while(*str != '\0')rn rn if(*str == 't')rn rn *str = ' '; //调试在这走不下去了rn rn str++;rn rn rn return true;rnrnvoid main()rnrn char *str = "string test";rn Fun(str);rn cout<
代码没错,就是运行不了,求救
代码没显示错误,就是运行的时候弹出一个“Sorry! the application EX04_02(process irdc.EX04_02)has stopped unexpectedly.Please try again”的窗口。求解答啊,不胜感激rn!!rn代码如下:rnpackage irdc.EX04_02; rnimport android.app.Activity;rnimport android.os.Bundle;rnimport android.view.View;rn/*使用OnClickListener与OnFocusChangeListener来区隔按钮的状态*/ rnimport android.view.View.OnClickListener;rnimport android.widget.ImageButton; rn//addrnimport android.content.Intent;rnimport android.widget.Button;rnrnpublic class EX04_02 extends Activityrn rn rn private ImageButton mImageButton1;rn private ImageButton mImageButton2;rn private ImageButton mImageButton3;rn private ImageButton mImageButton4;rn private ImageButton mImageButton5;rn private ImageButton mImageButton6;rn private ImageButton mImageButton7;rn rn /** Called when the activity is first created. */ rn @Override rn public void onCreate(Bundle savedInstanceState)rn rn super.onCreate(savedInstanceState);rn setContentView(R.layout.main); rnrn mImageButton1 =(ImageButton) findViewById(R.id.myImageButton1); rn mImageButton2 =(ImageButton) findViewById(R.id.myImageButton2);rn mImageButton3 =(ImageButton) findViewById(R.id.myImageButton3);rn mImageButton4 =(ImageButton) findViewById(R.id.myImageButton4); rn mImageButton5 =(ImageButton) findViewById(R.id.myImageButton5);rn mImageButton6 =(ImageButton) findViewById(R.id.myImageButton6);rn mImageButton7 =(ImageButton) findViewById(R.id.myImageButton7);rn rn /*透过onClickListener来响应ImageButton的onClick事件*/ rn /* mImageButton1.setOnClickListener(new OnClickListener()rn rn public void onClick(View v) rn rn // TODO Auto-generated method stub rn mImageButton1.setImageResource(R.drawable.iconfull);rn rn rn ); */ rn rn //addrn mImageButton1.setOnClickListener(new OnClickListener()rn rn public void onClick(View v) rn rn // TODO Auto-generated method stub rn // mImageButton1.setImageResource(R.drawable.iconfull);rn Intent intent0 = new Intent(EX04_02.this,ActivityFrameLayout.class); rn setTitle("FrameLayout鐨勪娇鐢�");rn startActivity(intent0);rn rn rn );rn rn rn rnrnpackage irdc.EX04_02;rnrnimport android.app.Activity;rnimport android.os.Bundle;rnimport android.view.View;rnimport android.view.View.OnClickListener;rnimport android.widget.Button;rnimport android.widget.ImageButton; rnrnpublic class ActivityFrameLayout extends Activity rn public void onCreate(Bundle savedInstanceState)rn super.onCreate(savedInstanceState);rn setContentView(R.layout.frame_layout);rn Button confirm = (Button)this.findViewById(R.id.confirm);rn confirm.setOnClickListener(comfirmListen);rn rn OnClickListener comfirmListen = new OnClickListener()rnrn public void onClick(View v) rn finish();rn rn rn rn ;rnrnrnrnrn rn rn rn rn rn rn rn rn rnrn rn rn rn rn rn rn rn rn rn rn rn rn rnrn rn rn rn rn rn rn rn rnrnrn
vb代码没错,但运行不了,为什么?
麻烦走过瞧见的帮我看看,谢谢!rnrn下面这段代码是抄的书上的,可是在我的电脑上出现了问题。运行时报错。rn第四行和第六行报错。rnrnPrivate Sub Command1_Click()rn Dim irn i = DateDiff("d", CDate(Text1), CDate(Text2))rn Label3.Caption= "日期差:"&i& "天"rn i = Abs(i)rn Label4.Caption="绝对值之差:"&i&"天"rnEnd SubrnrnPrivate Sub Form_Load()rn test2.Text = DaternEnd Subrn
c++程序 编译没错 运行不了 求解啊!!!
#include rn#include rn#include rn#include rnusing namespace std;rnint main()rn rn vector ivec;rn string word;rn int x=0;rn while(cin>>word)rn ivec.push_back(word);rn if(ivec.size()==0)rn rn return -1;rn rn for(vector::size_type inx=0;inx!=ivec.size();++inx)rn for(string::size_type index=0;index!=ivec[inx].size();++index)rn if(islower(ivec[inx][index]))rn ivec[inx][index]=toupper(ivec[inx][index]);rn cout<
运行不了程序
store 10 to x1,x2rndo p1 with x1,(x2)rn?x1,x2rnstore 10 to x1 ,x2rn?p1(x1,x2)rnreturnrnfunction p1(x1,x2)rnparameters x1,x2rnstore x1+10 to x1rnstore x2+10 to x2rnreturn x2+x2rnendfuncrnrnrn运行时老是出错(parameters x1,x2)rn
运行不了程序了
很久没用BCB6了,今天用的时候,发现运行任何工程都会出现"project XXXX raised too many consecutive exception 'single step at 0x032261ee'",重装BCB还是出现相同错误,rn操作系统win2000+sp4
android程序在真机上运行不了
我的开发环境是 Device API version is 17 rn但是我的真机环境是Device API version is 10 (Android 2.3.6) 请问,怎样让开发好的程序在真机上运行?不会非得找个版本一致的真机来测试吧,这样也太坑人了呀
android 运行不了的问题
如图所示,解决办法
android停止运行app
adb shell     1. ps | grep 进程名 2.kill 进程编号 或者 am force-stop 包名   启动app adb shell am start -n 包名/类名
Android程序中安装APP
Android程序中安装APP总结 安装APP 方法1(普通) 这种方法通过 Intent 机制,调出系统安装应用,重新安装应用的话,会保留原应用的数据。 String fileName = Environment.getExternalStorageDirectory() + apkName ; Intent intent = new Intent(Inte
程序没错但是不能运行!!!急救
package cn.mypackage3;rnrnimport android.app.Activity;rnimport android.widget.Button;rnimport android.os.Bundle;rnimport android.os.Handler;rnimport android.view.View.OnClickListener;rnimport android.view.View;rnrnpublic class HandleActivity extends Activity rn /** Called when the activity is first created. */rn rn private Button startButton=null,endButton=null;rn public void onCreate(Bundle savedInstanceState) rn super.onCreate(savedInstanceState);rn setContentView(R.layout.main);rn startButton=(Button)findViewById(R.id.startButton);rn startButton.setText(R.string.start);rn endButton=(Button)findViewById(R.id.endButton);rn endButton.setText(R.string.end);rn startButton.setOnClickListener(new StartButtonListener());rn endButton.setOnClickListener(new EndButtonListener());rn rn class StartButtonListener implements OnClickListenerrn public void onClick(View view)rn handler.post(runnable);rn rn rn class EndButtonListener implements OnClickListenerrn public void onClick(View view)rn handler.removeCallbacks(runnable);rn rn rn Handler handler=new Handler();rn Runnable runnable=new Runnable()rn public void run()rn System.out.println("go");rn handler.postDelayed(runnable, 3000);rn rn ;rn rn
程序没错,但是运行不出结果
rnPrivate Sub Command1_Click()rnDim strSQL As StringrnDim strCon(7) As StringrnDim intCount As IntegerrnDim i As IntegerrnintCount = 0rn'获得所有得查询条件rnIf Text1.Text <> "" Thenrn If Check1.Value = 1 Thenrn strCon(1) = "船型 like '%" & Text1.Text & "%'"rn Elsern strCon(1) = "船型='" & Text1.Text & "'"rn End IfrnElsern strCon(1) = ""rnEnd IfrnIf Text2.Text <> "" Thenrn If Check1.Value = 1 Thenrn strCon(2) = "产品号 like '%" & Text2.Text & "%'"rn Elsern strCon(2) = "产品号='" & Text2.Text & "'"rn End IfrnElsern strCon(2) = ""rnEnd IfrnIf Text3.Text <> "" Thenrn If Check1.Value = 1 Thenrn strCon(3) = "图号 like '%" & Text3.Text & "%'"rn Elsern strCon(3) = "图号='" & Text3.Text & "'"rn End IfrnElsern strCon(3) = ""rnEnd IfrnIf Text4.Text <> "" Thenrn If Check1.Value = 1 Thenrn strCon(4) = "零件号 like '%" & Text4.Text & "%'"rn Elsern strCon(4) = "零件号='" & Text4.Text & "'"rn End IfrnElsern strCon(4) = ""rnEnd IfrnIf Text5.Text <> "" Thenrn If Check1.Value = 1 Thenrn strCon(5) = "校管状态 like '%" & Text5.Text & "%'"rn Elsern strCon(5) = "校管状态='" & Text5.Text & "'"rn End IfrnElsern strCon(5) = ""rnEnd IfrnIf Text6.Text <> "" Thenrn If Check1.Value = 1 Thenrn strCon(6) = "校管日期 like '%" & Text6.Text & "%'"rn Elsern strCon(6) = "校管日期='" & Text6.Text & "'"rn End IfrnElsern strCon(6) = ""rnEnd IfrnIf Text7.Text <> "" Thenrn If Check1.Value = 1 Thenrn strCon(7) = "校管施工人 like '%" & Text7.Text & "%'"rn Elsern strCon(7) = "校管施工人='" & Text7.Text & "'"rn End IfrnElsern strCon(7) = ""rnEnd IfrnrnIf strCon(1) = "" And strCon(2) = "" And strCon(3) = "" And strCon(4) = "" And strCon(5) = "" And strCon(6) = "" And strCon(7) = "" Thenrn strSQL = "select * from xinxi"rnElsern strSQL = "select * from xinxi where "rn For i = 1 To 7rn If strCon(i) <> "" Thenrn intCount = intCount + 1rn If intCount = 1 Thenrn strSQL = strSQL + strCon(i)rn Elsern strSQL = strSQL + " and " + strCon(i)rn End Ifrn End Ifrn NextrnEnd IfrnAdodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db1.mdb;Persist Security Info=False"rnAdodc1.CursorLocation = adUseClientrnAdodc1.CommandType = adCmdTextrnAdodc1.RecordSource = strSQLrnAdodc1.RefreshrnEnd SubrnPrivate Sub Command2_Click()rnUnload MernEnd SubrnrnPrivate Sub Form_Load()rn Dim db As New ADODB.Connectionrn Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db1.mdb;Persist Security Info=False"rn db.ConnectionString = Adodc1.ConnectionStringrn If db.State <> ADODB.ObjectStateEnum.adStateClosed Then db.Closern db.Openrn rnEnd Subrn程序如上所示,麻烦大家看下什么问题。结果不能再DATAGIRD中显示出来。rnrn查询的条件是7个文本框。。。
编译没错,运行有错?
[code=Java]import java.util.Arrays;rnimport java.util.List;rnpublic class AddingGroup rn public static void main(String args[])rn List list = Arrays.asList(16,17,18,19,20);rn list.set(1,99);rn list.add(21); rn rn[/code]
运行没错,结果差远
#includern#includernvoid main()rnrn double c,f;rn c=(f-32)*5/9;rn cout<<"input c:";rn cin>>c;rn cout<
c#程序为什么在.NET中运行不了?
一个简单的C#程序为什么就运行不了呢?rn报的错误是:rnrnA project with an Output Type of Class Library cannot be started directly
C++builder中有的程序编译没错但无法运行,出现:
C++builder中有的程序编译没错但无法运行,出现:rnEMCIDeviceErrow with message 'MMSYSTEM266 设备无法加载,请检测程序是否正确安装'rnrn不知是怎么回事,请教!
doc命令运行不了mvn -v(环境变量配置没错)
1. doc命令运行不了mvn -v(环境变量配置没错) 原因:修改了maven包名,正常如下 我之前把这包名改成了maven,导致dos命令运行不了mvn -v
帮忙看看哪里错了~!(急)编译没错,但是运行不了
一、 问题描述:rn航空客运订票的业务活动包括:查询航线、客票预定和办理退票等。试设计一个航空客运订票系统,以使上述业务可以借助计算机来完成。rn二、 基本要求:rn(1)每条航线所涉及的信息有:终点站名、航班号、飞机号、飞行日期(星期几)、成员定额、余票量、已订票的客户名单(包括姓名、订票量、舱位等级1,2或3)以及等候替补的客户名单(包括姓名、所需票量);rn(2)作为示意系统,全部数据可以只放在内存中;rn(3)系统能实现的操作和功能如下:rn①查询航线:根据旅客提出的终点站名输出下列信息:航班号、飞机号、星期几飞行,最近一天航班的日期和余票额;rn②承办订票业务:根据客户提出的要求(航班号、订票数额)查询该航班票额情况,若尚有余票,则为客户办理订票手续,输出座位号;若已满员或余票额少于订票额,则需重新询问客户要求。若需要,可登记排队候补;rn③承办退票业务:根据客户提供的情况(日期、航班),为客户办理退票手续,然后查询该航班是否有人排队候补,首先询问排在第一的客户,若所退票额能满足他的要求,则为它办理订票手续,否则依次询问其他排队候补的客户。rn三、 测试数据:rn自行指定。rn四、 实现提示:rn两个客户名单可分别由线性表和队列实现。为查找方便,已订票客户的线性表应按客户姓名有序,并且,为插入和删除方便,应以链表作存储结构。由于预约人数无法预计,队列也应以链表作存储结构。整个系统需汇总各条航线的情况登陆在一张线性表上,由于航线基本不变,可采用顺序存储结构,并按航班有序或按终点站名有序,每条航线是这张表上的一个记录,包含上述8个域、其中成员名单域为指向成员名单链表的头指针,等候替补的客户名单域为分别指向队头和队尾的指针。rn五、 程序源代码:rn六、 rn #include rn#include rn#define AIRLINENUM 5 //航线数量rntypedef struct Waitertypern char name[10]; //等待订票的客户的名字rn int neednum; //该客户所需票数rn struct Waitertype *next;rnWaitertype;rntypedef structrnrn Waitertype *front;rn Waitertype *rear;rnWaitQueue;rntypedef structrn char *planenum; //航班号rn char *endstation; //终点站名rn char *weekday; //飞行周日rn int seatnum; //飞机乘员定额rn int remainnum; //余票数rn int waiternum; //等待订票的客户数量rn WaitQueue Q; //等待订票的客户队列rnAirlineInfor; //航线信息rnrn//*****************************************************************rnrnvoid InitAirline(AirlineInfor airline[]) //初始化rn airline[0].planenum="EA391";rn airline[0].endstation="shanghai";rn airline[0].weekday="Monday";rn airline[0].seatnum=100;rn airline[0].remainnum=5;rn airline[0].waiternum=0;rn airline[0].Q.front=airline[0].Q.rear=(Waitertype*)malloc(sizeof(Waitertype));rn airline[1].planenum="EA392";rn airline[1].endstation="beijing";rn airline[1].weekday="Tuesday";rn airline[1].seatnum=100;rn airline[1].remainnum=3;rn airline[1].waiternum=0;rn airline[1].Q.front=airline[1].Q.rear=(Waitertype*)malloc(sizeof(Waitertype));rn airline[2].planenum="EA393";rn airline[2].endstation="fuzhou";rn airline[2].weekday="Wednesday";rn airline[2].seatnum=100;rn airline[2].remainnum=0;rn airline[2].waiternum=0;rn airline[2].Q.front=airline[2].Q.rear=(Waitertype*)malloc(sizeof(Waitertype));rn airline[3].planenum="EA394";rn airline[3].endstation="shanghai";rn airline[3].weekday="Thursday";rn airline[3].seatnum=100;rn airline[3].remainnum=0;rn airline[3].waiternum=0;rn airline[3].Q.front=airline[3].Q.rear=(Waitertype*)malloc(sizeof(Waitertype));rn airline[4].planenum="EA395";rn airline[4].endstation="tianjin";rn airline[4].weekday="Friday";rn airline[4].seatnum=100;rn airline[4].remainnum=1;rn airline[4].waiternum=0;rn airline[4].Q.front=airline[4].Q.rear=(Waitertype*)malloc(sizeof(Waitertype));rn/*InitAirline*/rnrn//*****************************************************************rnvoid AskAirline(AirlineInfor airline[]) //查询模块rn int i,cmd,flag=0;rn char *endstation= NULL;rn printf("Please enter where you want to go:");rn scanf("%s",endstation); //输入目的地rn printf("\n");rn printf("You can take these planes:\n"); /*列出余票信息,包含:航班号,飞行周日以及余票量*/rn for(i=0;i=AIRLINENUM)rn if(flag==0)rn printf("Without the ticket you want!\n");rn printf("1-->Continue,2-->End this service:");rn scanf("%d",&cmd);rn printf("\n");rn switch(cmd)rn case 1:rn AskAirline(airline); //继续查询rn break;rn case 2: rnprintf("You have exited this service\n");rn break;rn default:rn printf("You have enter a wrong command!\n");rn break;rn rn /*if*/rn/*AskAirline*/rn//*****************************************************************rnvoid InQueue(WaitQueue *Q,int neednum) //排队等票rnrn Waitertype *p1,*p2;rn p1=(Waitertype*)malloc(sizeof(Waitertype));rn printf("Please enter your name:");rn scanf("%s",p1->name);rn p1->neednum=neednum;rn p1->next=NULL;rn p2=Q->rear; //以下3行用于插入新的客户排队等票rn p2->next=p1;rn Q->rear=p1;rnrnvoid RegisterAirline(AirlineInfor airline[]) //订票模块rn char *planenum=NULL; //所要预定机票的航班号rn int neednum; //所需数量rn int i=0,num=0,cmd1,cmd2,cmd3;rn printf("Please enter the NO.:");rn scanf("%s",planenum);rn printf("\n");rn printf("Please enter quantity you need :");rn scanf("%d",&neednum);rn printf("\n");rn while(strcmp(planenum,airline[i].planenum)&&(i=AIRLINENUM) //错误处理rn printf("Without the ticket you want!\n");rn printf("1-->Continue,2-->End this service:");rn scanf("%d",&cmd1);rn printf("\n");rn switch(cmd1)rn case 1:rn RegisterAirline(airline);break;rn case 2:rn printf("You have exited this service!\n");rn break;rn default:rn printf("You have enter a wrong command!\n");rn break;rn rn /*if*/rn elsern num=airline[i].remainnum;rnloop: if(neednum<=airline[i].remainnum) //订票成功rn rn airline[i].remainnum=airline[i].remainnum-neednum;rn printf("Successfully registering!\n");rn rn elsern if(num==0) //没有余票rn printf("Without any tickets that you want!\n");rn printf("1-->Wait for tickets,2-->End this service:\n");rn scanf("%d",&cmd2);rn printf("\n");rn switch(cmd2)rn case 1:rn airline[i].waiternum++;rn InQueue(&airline[i].Q,neednum);rn printf("When we have enough tickets,we'll inform you!\n");rn break;rn case 2:rn break;rn default:rn printf("You have enter a wrong command!\n");rn break;rn /*switch*/rn /*if*/rn elsern rn printf("Without enough tickets!\n"); //客户需要机票数量超出余票数量rn printf("1-->Reduce the quality,2-->End this service:");rn scanf("%d",&cmd3);rn printf("\n");rn switch(cmd3)rn case 1:rn printf("Please reenter the quantity you need :");rn scanf("%d",&neednum);rn printf("\n");rn goto loop;rn case 2:rn break;rn default:rn printf("You have enter a wrong command!\n");rn break;rn /*switch*/rn /*else*/rn /*else*/rn /*else*/rn/*RegisterAirline*/rnrn//*****************************************************************rnvoid SearchQueue(AirlineInfor airline[],int i) /*为退票而多出的票寻找符合条件的等待客户办理订票*/rnrn int remainnum=0,j,num=0;rn WaitQueue Q;rn Waitertype *p1,*p3;rn remainnum=airline[i].remainnum;rn Q=airline[i].Q;rn num=airline[i].waiternum;rn p3=p1=Q.front;rn p1=p1->next;rn for(j=1;j<=num;j++) //为符合条件的等待客户办理订票rn rn if(p1->neednum<=remainnum)rn printf("%s get %d tickets\n",p1->name,p1->neednum);rn airline[i].remainnum-=p1->neednum;rn if(p1==Q.rear)rn Q.rear=Q.front; //如果P1刚好也是队尾结点,这使队列为空队列rn elsern p3->next=p1->next;rn free(p1);rn p1=p3;p1=p1->next;rn /*释放P1指针所指的结点,并把队头指针的next指向p1的next*/rn elsern rn if(p1==Q.rear)rn return;rn elsern p3->next=p1->next;rn Q.rear->next=p1;p1->next=NULL;rn Q.rear=p1;p1=p3;p1=p1->next;rn /*如果p1!=Q.rear,把P1所指的结点插入到队列的队尾,队头指针的next指向P1的next*/rn rn rnrnrnrnvoid RebackAirline(AirlineInfor airline[])/*退票模块,成功返回1,失败或放弃返回0*/rn char *planenum=NULL;/*所退机票的航班号*/rn int i=0,j,cmd1,cmd2,backnum;rn printf("Please enter the NO. of the plane:");rn scanf("%s",planenum);rn printf("\n");rn printf("Please enter the quantity you want to reback:");rn scanf("%d",&backnum);/*所退票数*/rn printf("\n");rn while(strcmp(planenum,airline[i].planenum)&&(iContinue this service,2-->End this service:");rn scanf("%d",&cmd2);rn printf("\n");rn switch(cmd2)rn case 1:rn RebackAirline(airline);break;rn case 2:rn printf("Unsuccessfully reback!\n");rn break;rn default:rn printf("You have enter a wrong command!\n");rn break;rn rn /*else*/rn/*RebackAirline*/rnrn//*****************************************************************rnrnvoid main()rn AirlineInfor airline[AIRLINENUM]; //航线数量rn int cmd;rn InitAirline(airline); //初始化rn printf("Welcome to use this system!!!\n");rn dorn printf("1-->Ask for information,2-->Register tickets,3-->Reback tickets:0-->Exit:");rn scanf("%d",&cmd);rn printf("\n");rn switch(cmd)rn rn case 0:rn printf("Thanks for use this system!\n");rn break;rn case 1:rn AskAirline(airline);/*查询模块*/rn break;rn case 2:rn RegisterAirline(airline);/*订票模块*/rn break;rn case 3:rn RebackAirline(airline);/*退票模块*/rn break;rn default:rn printf("You have enter a wrong command!\n");rn break;rn /*switch*/rn while(cmd);rn/*main*/rn
真机调试相机时编译没错但是运行不了
下面是Log的信息rn10-06 20:54:09.950 10582-10582/com.example.pacificl.pictures E/ArrayAdapter﹕ You must supply a resource ID for a TextViewrn10-06 20:54:09.960 10582-10582/com.example.pacificl.pictures E/AndroidRuntime﹕ FATAL EXCEPTION: mainrn Process: com.example.pacificl.pictures, PID: 10582rn java.lang.IllegalStateException: ArrayAdapter requires the resource ID to be a TextViewrn at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:386)rn at android.widget.ArrayAdapter.getView(ArrayAdapter.java:362)rn at android.widget.AbsListView.obtainView(AbsListView.java:2263)rn at android.widget.ListView.measureHeightOfChildren(ListView.java:1263)rn at android.widget.ListView.onMeasure(ListView.java:1175)rn at android.view.View.measure(View.java:16530)rn at android.widget.RelativeLayout.measureChild(RelativeLayout.java:689)rn at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:473)rn at android.view.View.measure(View.java:16530)rn at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5133)rn at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)rn at android.support.v7.internal.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:124)rn at android.view.View.measure(View.java:16530)rn at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5133)rn at android.support.v7.internal.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:393)rn at android.view.View.measure(View.java:16530)rn at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5133)rn at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)rn at android.view.View.measure(View.java:16530)rn at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5133)rn at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1427)rn at android.widget.LinearLayout.measureVertical(LinearLayout.java:713)rn at android.widget.LinearLayout.onMeasure(LinearLayout.java:606)rn at android.view.View.measure(View.java:16530)rn at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5133)rn at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)rn at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2340)rn at android.view.View.measure(View.java:16530)rn at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:1966)rn at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1137)rn at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1327)rn at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1024)rn at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5783)rn at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)rn at android.view.Choreographer.doCallbacks(Choreographer.java:574)rn at android.view.Choreographer.doFrame(Choreographer.java:544)rn at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)rn at android.os.Handler.handleCallback(Handler.java:733)rn at android.os.Handler.dispatchMessage(Handler.java:95)rn at android.os.Looper.loop(Looper.java:136)rn at android.app.ActivityThread.main(ActivityThread.java:5234)rn at java.lang.reflect.Method.invokeNative(Native Method)rn at java.lang.reflect.Method.invoke(Method.java:515)rn at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:834)rn at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:650)rn at dalvik.system.NativeStart.main(Native Method)rn Caused by: java.lang.ClassCastException: android.widget.LinearLayout cannot be cast to android.widget.TextViewrn at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:379)rn            at android.widget.ArrayAdapter.getView(ArrayAdapter.java:362)rn            at android.widget.AbsListView.obtainView(AbsListView.java:2263)rn            at android.widget.ListView.measureHeightOfChildren(ListView.java:1263)rn            at android.widget.ListView.onMeasure(ListView.java:1175)rn            at android.view.View.measure(View.java:16530)rn            at android.widget.RelativeLayout.measureChild(RelativeLayout.java:689)rn            at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:473)rn            at android.view.View.measure(View.java:16530)rn            at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5133)rn            at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)rn            at android.support.v7.internal.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:124)rn            at android.view.View.measure(View.java:16530)rn            at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5133)rn            at android.support.v7.internal.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:393)rn            at android.view.View.measure(View.java:16530)rn            at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5133)rn            at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)rn            at android.view.View.measure(View.java:16530)rn            at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5133)rn            at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1427)rn            at android.widget.LinearLayout.measureVertical(LinearLayout.java:713)rn            at android.widget.LinearLayout.onMeasure(LinearLayout.java:606)rn            at android.view.View.measure(View.java:16530)rn            at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5133)rn            at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)rn            at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2340)rn            at android.view.View.measure(View.java:16530)rn            at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:1966)rn            at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1137)rn            at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1327)rn            at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1024)rn            at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5783)rn            at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)rn            at android.view.Choreographer.doCallbacks(Choreographer.java:574)rn            at android.view.Choreographer.doFrame(Choreographer.java:544)rn            at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)rn            at android.os.Handler.handleCallback(Handler.java:733)rn            at android.os.Handler.dispatchMessage(Handler.java:95)rn            at android.os.Looper.loop(Looper.java:136)rn            at android.app.ActivityThread.main(ActivityThread.java:5234)rn            at java.lang.reflect.Method.invokeNative(Native Method)rn            at java.lang.reflect.Method.invoke(Method.java:515)rn            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:834)rn            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:650)rn            at dalvik.system.NativeStart.main(Native Method)rn另外我还想问一下这个Log这么多信息怎么看啊rn
程序在别的机子运行不了
rn上次学了个win32 api程序,在别的机子运行不了。说缺少什么*.dll文件,谢谢大家给我解决了,是release的问题。rn这次又学了个稍微复杂的,但是这次报错是什么程序配置不正确,不知是什么原因,请高手再解决一下。谢谢了。
自编的程序怎么运行不了
运行.exe主程序时,出现错误提示:rn stock.exe-找不到序数rn           无法定位序数5076于动态链接库mfc42d.dll上。rn                   确定rn请问哪位大侠知道这是怎么了,我真是没有辙了,拜谢了!!
asp程序怎么运行不了
操作系统windows server 2003,有一块网卡,独立的一台不能上网的电脑,以前没有网卡的时候运行asp程序没问题,现在运行不了asp程序,总是提示找不到网页,不知道咋设置??~~
这段程序怎么运行不了?
package a;rnpublic class aaarnrn String emp="pacage's member variable";rn public void getMes()rn rn System.out.println(emp);rn rnrnimport a.aaa;rnpublic class testrnrn public static void main(String[] args)rn rn aaa a=new aaa();rn a.getMes();rn rnrn刚入门,麻烦哪位讲解下咯,呵呵。
一个XP下运行不了的程序
一个XP下运行不了的程序 一个XP下运行不了的程序
运行不了Jar包里的程序
自己遍了一个小程序 有图形界面的, 用eclipse 将其生成jar包 ,也设置了main class了,双击打开却还是解压缩, 我试过网上说的,在选择打开方式里找到 jdk1.7/bin/java.exe ,出现一个dos黑窗口闪烁了一下就没了,还是没法运行呢~ 小弟求高手们帮忙~
我运行不了C程序
各位高手,我想问一下在我安装了C程序后,写入代码总是有一个错误存在,写的程序是一点也没错,可就是不知应该调试那里才能解决.....???
我的程序咋运行不了
#includern#includern#includernmain()rnrnchar c;rn while(1);rn rn c=getch();rn switch(c)rn rn case 0:c=getch();rn switch(c)rn rn case 'K':printf("zuo");break;rn case 'M':printf("you");break;rn default:break;rn rn break;rn case 'R':rn case 'r':printf("r");break;rn case 'A':rn case 'a':printf("a");break;rn case 'I':rn case 'i':printf("i");break;rn case 'D':rn case 'd':printf("d");break;rn case 'S':rn case 's':printf("s");break;rn case 'T':rn case 't':printf("t");break;rn case '027':exit(-1);rn rn rnrn请教高手 无奈中~~
我的程序为什么运行不了?
#includern#define MAX_VERTEX_NUM 20rntypedef struct Node rn int adjvex;rn struct Node *nextarc;rn ArcNode;rntypedef struct VNode rn int data;rn ArcNode *firstarc;rn AdjList[MAX_VERTEX_NUM];rntypedef struct rn AdjList vertex;rn int vexnum,arcnum;rn Graph;rnvoid construct(Graph &);rnvoid DFSTraverse(Graph);rnvoid DFS(Graph,int);rnrnrnrnvoid main()rnrn Graph P;rn construct(P);rn DFSTraverse(P);rnrnrnvoid construct (Graph &G)rnrn int p,q;rn ArcNode *s;rn cin>>G.vexnum;rn for (int i=0;i>G.arcnum;rn for (int t=0;t>p>>q;rn s=new ArcNode;rn s->adjvex=q;rn s->nextarc=G.vertex[p].firstarc;rn G.vertex[p].firstarc=s;rn cout<adjvex;rn s=new ArcNode;rn s->adjvex=p;rn s->nextarc=G.vertex[q].firstarc;rn G.vertex[q].firstarc=s;rn rn rnrnrnbool visited[MAX_VERTEX_NUM];rnrnvoid DFSTraverse(Graph G)rnrn for (int v=0;vnextarc)rn if (!visited[w->adjvex])rn DFS(G,w->adjvex);rnrn如题,请教大侠们rn
输入C++程序,运行不了?
我输入一个很简单的C++程序,没有错误,但是运行不了,我知道是那软件哪里还没有弄好,但我不知道是哪里,那有哪些可能啊!谢谢指点!!
[求助]在VS2005运行不了的程序
#include rnrnclass CGenericApp : public CWinApprn rn public:rn virtual BOOL InitInstance();rn ;rnrnclass CgenericWindow : public CFrameWndrn rn public:rn CGenericWindow()rn rn Create(NULL, "Generic");rn rnrn afx_msg void OnLButtonDown(UINT nFlags, CPoint point);rn DECLARE_MESSAGE_MAP()rn ;rnrnBEGIN_MESSAGE_MAP(CGenericWindow, CFrameWi\nd)rn ON_WM_LBUTTONDOWN()rnEND_MESSAGE_MAP()rnrnvoid CGenericWindow::OnLButtonDown(UINT nFlags, CPoint point)rn rn MessageBos("Left mouse button pressed...", NULL, MB_OK):rn rnrnBOOL CGenericApp::InitInstance()rn rn m_pMainWnd = new CGenericWindow();rn m_pMainWnd->ShowWindow(m_nCmdShow);rn m_pMainWnd->UpdateWindow();rn return TRUE;rn rnrnCGenericApp GenericApp;rnrn运行时出现以下提示:rnd:\microsoft visual studio 8\vc\atlmfc\include\afx.h(24) : fatal error C1189: #error : Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d]rnrn这是什么意思??
IIS运行不了ASP程序 ?
Active Server Pages 错误 'ASP 0201' rnrn无效的默认脚本语言 rnrn为此应用程序指定的默认脚本语言无效。rn
我的程序为什么运行不了?
最近我在一台操作系统为WINDOOW95的电脑做了一个聊天程序,生成EXE文件后存在桌面运行起来没有出现在什么错误,可是当我把它移到软盘上时运行就是运行不了,到别的机子去也运行不了.系统提示程序不是WIN32程序或直接死机,甚至想删它也不行,马上死机.肯请合各位高手指点迷津!
我的程序怎么运行不了
# include "stdio.h"rn# include "stdlib.h"rn# define FALSE 0rn# define TRUE 1rn# define n 4rntypedef int datatype;rntypedef structrn int key;rn datatype other;rnrectype;rnstruct studentrn long num;rn char name[20];rn char sex;rn int age ;rn char major[10];rn int score;rnd[4];rnvoid enter() /*输入学生信息*/rn int i;rn for(i=1;i=i;j--)rn if(R[j+1].key=temp.key)&&(i=1;i--)rn SIFT(R,i,n);rn for(i=n;i>=1;i--)rn temp=R[1];rn R[1]=R[i];rn R[i]=temp;rn SIFT(R,1,i-1);rn rn for(i=1;i
这个程序怎么运行不了?
package converttodollar;rnrnimport java.io.*;rnimport java.applet.Applet;rnimport java.awt.*;rnimport java.awt.event.*;rnrnrnrnrnpublic class convertToDollar extends Applet implements ActionListenerrnrn Label label1,label2,label3 ;rn TextField textField1,textField2 ;rn Button button1 ;rnrn public void init()rn rn this.setLayout(new GridLayout(3,2,10,10));rn label1 = new Label("人民币") ;rn add(label1) ;rn textField1 = new TextField(12) ;rn add(textField1) ;rn label2 = new Label("汇率");rn add(label2) ;rn textField2 = new TextField(8) ;rn add(textField2);rn button1 = new Button("转换成为欧元") ;rn add(button1) ;rn button1.addActionListener(this) ;rn label3 = new Label() ;rn add(label3) ;rn rn rn public void actionPerformed(ActionEvent e)rn rn String s1 = textField1.getText() ;rn double x1 = Double.parseDouble(s1) ;rn String s2 = textField2.getText() ;rn double x2 = Double.parseDouble(s2) ;rn double total = x1 * x2 ;rn label3.setText("转换后的结果为= " + total + "$") ;rn rn rn rnrnrn错误提示:rnjava.lang.NoSuchMethodError: mainrnException in thread "main" rn rnrn大家帮忙看看,谢谢了!
相关热词 c#异步发送kafka c#窗体编号 c# 操作二进制文件 c# 反射 机制 c#线程 窗体失去响应 c#角度转弧度 c# 解析gps数据 c# vs设置 语法版本 c# json含回车 c#多线程demo