简体   繁体   English

找不到xx.apk

[英]Could not find xx.apk

I am a very beginer, trying to create my first Android application. 我是一个初学者,尝试创建我的第一个Android应用程序。 To do so, I use Eclipse and an AVD. 为此,我使用Eclipse和AVD。 I created my very first Class (called "Test") and when I run the project it says "Could not find Test.apk!" 我创建了我的第一个类(称为“测试”),当我运行项目时,它说“找不到Test.apk!”。

I had a look at many solutions an internet: - delete and import - clean up my project (I have only one class so there is not much to clean 我查看了Internet上的许多解决方案:-删除和导入-清理我的项目(我只有一堂课,所以清理的东西不多

And it still does not work. 而且它仍然不起作用。

Do you have any idea about how to proceed to fix this up? 您对如何解决此问题有任何想法吗?

Many thank for you help. 非常感谢您的帮助。

You don't give much information to know what's wrong. 您不会提供太多信息来知道出了什么问题。 What steps did you take to create this application? 您采取了什么步骤来创建此应用程序?

Does your class Test extend the class Activity? 您的课程Test是否扩展了Activity类?

If it does, is it declared in your project's AndroidManifest.xml file? 如果存在,是否在项目的AndroidManifest.xml文件中声明了它?

Also, make sure that your project is not set up as a library project. 另外,请确保您的项目未设置为库项目。 Right click on your project's name, select Properties->Android and make sure that IsLibrary is not checked. 右键单击项目名称,选择“属性”->“ Android”,并确保未选中IsLibrary。

Possible solutions:- 可能的解决方案:-

  • Sometimes the apk file is not generated simply because there are some android build error in your project, In this case, right click your project, choose Android Tools -> Fix Project Properties . 有时apk文件不是仅由于项目中存在一些android build错误而生成的,在这种情况下, 右键单击您的项目,选择Android Tools-> Fix Project Properties
  • Is your project termed as library, in this case, Go to Project->Properties--> Select Android from left-hand side list --> Uncheck the "Is Library" checkbox 您的项目是否称为库,在这种情况下,请转到项目->属性->从左侧列表中选择Android->取消选中“是库”复选框
  • Delete R.java file then clean build project or restart eclipse, this will force the workspace to be rebuild. 删除R.java文件,然后清理构建项目或重新启动eclipse,这将强制重新构建工作区。
  • what version of eclipse are you using, version of Eclipse using(Ganymede – 3.4) is not compatible with the latest version of the SDK. 您使用的是哪个版本的Eclipse,使用的Eclipse版本(Ganymede – 3.4)与最新版本的SDK不兼容。 Try updating Eclipse.. 尝试更新Eclipse。

Hope this helps.. 希望这可以帮助..

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM