Ok I am trying to make a project from a command line ( no开发者_运维百科t really sure how my book doesn't say WHAT OR WHERE the command line is ) and when I try to run android.bat from the windows command prompt I get this error telling me that it checked for Java 64 bit and it wasn't found , then it checked for Java 32 and it wasn't found. The thing is I just installed Java SE 32 bit last night from Oracles site.
In Control Panel Programs I see :
Java (TM) SE Development Kit 6 Update 23 Oracle 141 MB 1.6.0.230
Why is Android telling me it's not found?
Windows 7 Ultimate 64 bit Q6600 Intell quad core 4GBs DDR2 Ram Nvidia 8800 GTS Asus D2X
Gigabyte EP45-DSL3RUPDATE: Ok now I get this error :
Microsoft Windows [Version 6.1.7600] Copyright (c) 2009 Microsoft Corporation. All rights reserved.
G:\Programming\android-sdk_r08-windows\android-sdk-windows\tools>android create project --target 2 --path ./FirstApp --activity FirstApp --package Error: Missing argument for flag --package.
Usage: android [global options] create project [action options]
Global options: -v --verbose Verbose mode: errors, warnings and informational messages are pr inted. -h --help Help on a specific command. -s --silent Silent mode: only errors are printed out.
Action "create project": Creates a new Android project. Options: -n --name Project name -t --target Target ID of the new project [required] -p --path The new project's directory [required] -k --package Android package name for the application [required] -a --activity Name of the default Activity that is created [required]
G:\Programming\android-sdk_r08-windows\android-sdk-windows\tools>apt.tutorial strong text
Heres the line the book uses no mention of home any where: android create project --target 2 --path ./FirstApp --activity FirstApp --package apt.tutorial
That is one of my books.
Step #2 of Tutorial 1 has you check your Java environment and set up your PATH
. This occurs before Step #4 of Tutorial 1, where you use android create project
. AFAIK, that should have been sufficient. However, I do not use 64-bit Windows, and so I have no idea if there are any other things you need to do to get Java working there.
If you have further questions about this tutorial, please join the cw-android Google Group and ask there.
Please note that the version of the book you are using (Version 1.0 or the 1st Edition) is about 18 months old at the time of this writing, so you may encounter some challenges along the way. In particular, the latter half of the book is dominated by a sample Twitter client, which will no longer work due to the 2010 modification in Twitter authentication models. I have some instructions for how to try to patch the book, in essence, to use identi.ca, another microblogging client.
UPDATE
As you noted, I had the wrong book in mind. Here are the steps to set up your PATH
, as described in Android Programming Tutorials:
You should also be sure to add the directory for the Java commands to your PATH
by:
Finding where the Java commands are (e.g.,
C:\Program Files\Java\jdk1.6.0_12\bin
).Go to your Control Panel (Start > Settings > Control Panel).
Double-click on the System applet.
Click the Advanced tab.
Click the Environment Variables button.
If there is a
PATH
value in the User variables area at the top, add your path to the end by double-clicking the existing one, scrolling to the end, typing a semicolon (;) and the path from step #1 above. If there is no suchPATH
value, click the New button, fill in PATH as the Variable name and the path from step #1 above as the Variable value.
精彩评论