Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
280 views
in Technique[技术] by (71.8m points)

android - Adt doesn't create default hello world but command line does

My ADT worked correctly as same as whatever saw in tutorial until 2days ago when i created a project like before and also i selected "create a blank activity" and i expect it makes a default hello world project for me and a Main.java also a xml layout file, but it doesn't create this default hello world project anymore. i installed and updated Most of things in SDK Manager. i created another workspace and i did whatever i could but it doesn't create default hello world project. but when i create project from command line it works correctly and make a hello world project. why ADT doesn't do that? it's list of installed package on my SDK manager

SDK Manager list1 SDK Manager list2

and its the project tree in ADT that is empty when i create a project with blank activity:

Project tree in ADT

But it works in commandline. i use same sdk manager from command line:

~/Program/Andr/adt/sdk/tools $ ./android create project --target 24 --name MyFirstApp --path MyFirstApp --activity Main --package com.mrg.myfirstapp
Created project directory: MyFirstApp
....

And it makes Helloworld project:

enter image description here

My OS is linux Mint 15-16bit:

$ uname -a
Linux mrg-samsung 3.8.0-19-generic #30-Ubuntu SMP Wed May 1 16:35:23 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

It's my java version:

$ java -version
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)

and its my ADT version:

enter image description here

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

This problem was because of New version of SDK and ADT so to update ADT please add this address: https://dl-ssl.google.com/android/eclipse/ ** Be aware it doesn't work with exciting address begin with http so go to Install New software in ADT and do these steps: enter image description here

Then Select this and press Next and Next and accept licence and press finish to download and install: enter image description here

Now after restart ADT if you create a project it will work another problem i saw was the AVD doesn't work correctly you can not add new device to solve this problem run this command from SDK path:

~/Program/android/adt/sdk/tools $ ./android avd

After add your device go to ADT and open AVD from eclipse and press Refresh enter image description here

It should work now


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...