首页 > 电脑

java问题

更新时间2019-01-27 05:40:44

用eclipse(已安装ADT)创建android项目b,代码如下:


package com.example.b;

public class b{

 public static void main(String[]args){

  int[] b={4,-7,3,6,4,7}; 

 b hh=new b();  hh.sort(b);

  } 

public void sort(int[] b){ 

 for(int i=1;i<b.length;++i){ 

  for(int j=0;j<b.length-i;j++){   

 if(b[j]<b[j+1]){ 

    int u;     u=b[j];     b[j]=b[j+1];     b[j+1]=u;

    } 

  } 

 } 

 p(b); 

public void p(int[] b){ 

 for(int x:b){

   System.out.print("   " + x); 

 } 

}

}


返回错误如下:


[2019-01-24 08:55:09 - b] ------------------------------

[2019-01-24 08:55:09 - b] Android Launch!

[2019-01-24 08:55:09 - b] The connection to adb is down, and a severe error has occured.

[2019-01-24 08:55:09 - b] You must restart adb and Eclipse.

[2019-01-24 08:55:09 - b] Please ensure that adb is correctly located at 'F:程序3android-sdk-windowsplatform-toolsadb.exe' and can be executed.

[2019-01-24 10:31:09 - b] ------------------------------

[2019-01-24 10:31:09 - b] Android Launch!

[2019-01-24 10:31:09 - b] adb is running normally.

[2019-01-24 10:31:09 - b] Could not find b.apk![2019-01-24 10:36:48 - b] ------------------------------

[2019-01-24 10:36:48 - b] Android Launch![2019-01-24 10:36:48 - b] adb is running normally.

[2019-01-24 10:36:48 - b] Could not find b.apk!


Could not find b.apk?????什么况???????求大神指教。
java问题



你确定你的项目是android的?

从你的界面上看,你的项目就是普通的java

没有android的配置,不能生成android应用的

(最基本的.android项目主程序没有不是main入口,更不可能用system.out的

你的只是java开发

不是说找不到b.apk吗,你仔细看看。

相关标签:java

上一篇:菲利宾语言不懂怎么办

下一篇:请问大神,excel表中如何在多列单元格中筛选关键字行数并输出行数个数,需要进行多个不同的关键字筛选