java问题
用eclipse(已安装ADT)创建android项目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?????什么情况???????求大神指教。
你确定你的项目是android的?
从你的界面上看,你的项目就是普通的java类
没有android的配置,不能生成android应用的
(最基本的.android项目主程序没有不是main入口,更不可能用system.out的
你的只是java开发
不是说找不到b.apk吗,你仔细看看。