Beginner unable to create First Android Applicatio

2019-07-22 01:49发布

问题:

I have downloaded the ADT bundle (Build: v22.0.1-685705) to my Macbook Pro OS X 10.8.4, and installed it according to the Android Developer instructions (on Wednesday 19 June). When I try to create a new Application Project, using all default settings, I get an error message: java.lang.NullPointerException.

I have searched this term online, and understand that it refers to something the software cannot find. In the various forums, including this one, I can only find complicated references to acronyms that mean nothing to me, or that the problem is slightly different.

When I try to run the Application that has apparently been created,as it appears in the list, I get this:

[2013-06-21 18:21:50 - SDK Manager] [SDK Manager] log4j:WARN No appenders could be found for logger (org.apache.http.impl.conn.SingleClientConnManager).
[2013-06-21 18:21:50 - SDK Manager] [SDK Manager] log4j:WARN Please initialize the log4j system properly.
[2013-06-21 18:31:16 - Test2] ------------------------------
[2013-06-21 18:31:16 - Test2] Android Launch!
[2013-06-21 18:31:16 - Test2] adb is running normally.
[2013-06-21 18:31:16 - Test2] Could not find Test2.apk!

When I attempt to find Java files in the application, there are none. In fact, there don't seem to be any actual files, only folders. I would attach a screenshot, but I'm too new here, they won't let me.

I have tried to click on Properties, but nothing happens.

I have uninstalled, and reinstalled the ADT bundle three times.

I am an absolute beginner. I would be grateful for absolute beginner advice.

回答1:

I posted this answer recently for someone else but it may help you. It's a ten-minute "just get something running" step-by-step. The steps were done on a Windows installation of Eclipse but I believe it will work the same on the Mac. If it works then you know your setup is good. If it doesn't, then perhaps your setup isn't right.

Good luck.