Android Lanunch
 Your project contains error(s) please fix them before running your application
--------------------------------\
下面是控制台报错
[2011-11-30 14:54:27 - TestIO] ------------------------------
[2011-11-30 14:54:27 - TestIO] Android Launch!
[2011-11-30 14:54:27 - TestIO] adb is running normally.
[2011-11-30 14:54:27 - TestIO] Performing com.EX01.Ex_11 activity launch
[2011-11-30 14:54:28 - TestIO] Automatic Target Mode: using device '11223344'
[2011-11-30 14:54:28 - TestIO] Uploading TestIO.apk onto device '11223344'
[2011-11-30 14:54:28 - TestIO] Installing TestIO.apk...
[2011-11-30 14:54:29 - TestIO] Installation failed due to invalid APK file!
[2011-11-30 14:54:29 - TestIO] Please check logcat output for more details.
[2011-11-30 14:54:29 - TestIO] Launch canceled!
[2011-11-30 14:54:48 - TestIO] ERROR: Unknown option '--no-crunch'
[2011-11-30 14:54:48 - TestIO] Android Asset Packaging Tool
[2011-11-30 14:54:48 - TestIO] 
[[2011-11-30 14:54:48 - TestIO]    Package the android resources.  It will read assets and resources that are
[2011-11-30 14:54:48 - TestIO]    supplied with the -M -A -S or raw-files-dir arguments.  The -J -P -F and -R
[2011-11-30 14:54:48 - TestIO]    options control which files are output.
[2011-11-30 14:54:48 - TestIO] 
[2011-11-30 14:54:48 - TestIO]  aapt r[emove] [-v] file.{zip,jar,apk} file1 [file2 ...]
[2011-11-30 14:54:48 - TestIO]    Delete specified files from Zip-compatible archive.
[2011-11-30 14:54:48 - TestIO] 
[2011-11-30 14:54:48 - TestIO]  aapt a[dd] [-v] file.{zip,jar,apk} file1 [file2 ...]
[2011-11-30 14:54:48 - TestIO]    Add specified files to Zip-compatible archive.
[2011-11-30 14:54:48 - TestIO] 
[2011-11-30 14:54:48 - TestIO]  aapt v[ersion]
[2011-11-30 14:54:48 - TestIO]    Print program version.
[2011-11-30 14:54:48 - TestIO] 
[2011-11-30 14:54:48 - TestIO]  Modifiers:
[2011-11-30 14:54:48 - TestIO]    -a  print Android-specific data (resources, manifest) when listing
[2011-11-30 14:54:48 - TestIO]    -c  specify which configurations to include.  The default is all
[2011-11-30 14:54:48 - TestIO]        configurations.  The value of the parameter should be a comma
[2011-11-30 14:54:48 - TestIO]        separated list of configuration values.  Locales should be specified
[2011-11-30 14:54:48 - TestIO]        as either a language or language-region pair.  Some examples:
[2011-11-30 14:54:48 - TestIO]             en
[2011-11-30 14:54:48 - TestIO]             port,en
[2011-11-30 14:54:48 - TestIO]             port,land,en_US
[2011-11-30 14:54:48 - TestIO]        If you put the special locale, zz_ZZ on the list, it will perform
[2011-11-30 14:54:48 - TestIO]        pseudolocalization on the default locale, modifying all of the
[2011-11-30 14:54:48 - TestIO]        strings so you can look for strings that missed the
[2011-11-30 14:54:48 - TestIO]        internationalization process.  For example:
[2011-11-30 14:54:48 - TestIO]             port,land,zz_ZZ
[2011-11-30 14:54:48 - TestIO]    -d  one or more device assets to include, separated by commas
[2011-11-30 14:54:48 - TestIO]    -f  force overwrite of existing files
[2011-11-30 14:54:48 - TestIO]    -g  specify a pixel tolerance to force images to grayscale, default 0
[2011-11-30 14:54:48 - TestIO]    -j  specify a jar or zip file containing classes to include
[2011-11-30 14:54:48 - TestIO]    -k  junk path of file(s) added
[2011-11-30 14:54:48 - TestIO]    -m  make package directories under location specified by -J
[2011-11-30 14:54:48 - TestIO]    -u  update existing packages (add new, replace older, remove deleted files)
[2011-11-30 14:54:48 - TestIO]    -v  verbose output
[2011-11-30 14:54:48 - TestIO]    -x  create extending (non-application) resource IDs
[2011-11-30 14:54:48 - TestIO]    -z  require localization of resource attributes ed with
[2011-11-30 14:54:48 - TestIO]        localization="suggested"
[2011-11-30 14:54:48 - TestIO]    -A  additional directory in which to find raw asset files
[2011-11-30 14:54:48 - TestIO]    -G  A file to output proguard options into.
[2011-11-30 14:54:48 - TestIO]    -F  specify the apk file to output
[2011-11-30 14:54:48 - TestIO]    -I  add an existing package to base include set
[2011-11-30 14:54:48 - TestIO]    -J  specify where to output R.java resource constant definitions
[2011-11-30 14:54:48 - TestIO]    -M  specify full path to AndroidManifest.xml to include in zip
[2011-11-30 14:54:48 - TestIO]    -P  specify where to output public resource definitions
[2011-11-30 14:54:48 - TestIO]    -S  directory in which to find resources.  Multiple directories will be scanned
[2011-11-30 14:54:48 - TestIO]        and the first match found (left to right) will take precedence.
[2011-11-30 14:54:48 - TestIO]    -0  specifies an additional extension for which such files will not
[2011-11-30 14:54:48 - TestIO]        be stored compressed in the .apk.  An empty string means to not
[2011-11-30 14:54:48 - TestIO]        compress any files at all.
[2011-11-30 14:54:48 - TestIO]    --debug-mode
[2011-11-30 14:54:48 - TestIO]        inserts android:debuggable="true" in to the application node of the
[2011-11-30 14:54:48 - TestIO]        manifest, making the application debuggable even on production devices.
[2011-11-30 14:54:48 - TestIO]    --min-sdk-version
[2011-11-30 14:54:48 - TestIO]        inserts android:minSdkVersion in to manifest.  If the version is 7 or
[2011-11-30 14:54:48 - TestIO]        higher, the default encoding for resources will be in UTF-8.
[2011-11-30 14:54:48 - TestIO]    --target-sdk-version
[2011-11-30 14:54:48 - TestIO]        inserts android:targetSdkVersion in to manifest.
[2011-11-30 14:54:48 - TestIO]    --max-res-version
[2011-11-30 14:54:48 - TestIO]        ignores versioned resource directories above the given value.
[2011-11-30 14:54:48 - TestIO]    --values
[2011-11-30 14:54:48 - TestIO]        when used with "dump resources" also includes resource values.
[2011-11-30 14:54:48 - TestIO]    --version-code
[2011-11-30 14:54:48 - TestIO]        inserts android:versionCode in to manifest.
[2011-11-30 14:54:48 - TestIO]    --version-name
[2011-11-30 14:54:48 - TestIO]        inserts android:versionName in to manifest.
[2011-11-30 14:54:48 - TestIO]    --custom-package
[2011-11-30 14:54:48 - TestIO]        generates R.java into a different package.
[2011-11-30 14:54:48 - TestIO]    --auto-add-overlay
[2011-11-30 14:54:48 - TestIO]        Automatically add resources that are only in overlays.
[2011-11-30 14:54:48 - TestIO]    --rename-manifest-package
[2011-11-30 14:54:48 - TestIO]        Rewrite the manifest so that its package name is the package name
[2011-11-30 14:54:48 - TestIO]        given here.  Relative class names (for example .Foo) will be
[2011-11-30 14:54:48 - TestIO]        changed to absolute names with the old package so that the code
[2011-11-30 14:54:48 - TestIO]        does not need to change.
[2011-11-30 14:54:48 - TestIO]    --rename-instrumentation-target-package
[2011-11-30 14:54:48 - TestIO]        Rewrite the manifest so that all of its instrumentation
[2011-11-30 14:54:48 - TestIO]        components target the given package.  Useful when used in
[2011-11-30 14:54:48 - TestIO]        conjunction with --rename-manifest-package to fix tests against
[2011-11-30 14:54:48 - TestIO]        a package that has been renamed.
[2011-11-30 14:54:48 - TestIO]    --product
[2011-11-30 14:54:48 - TestIO]        Specifies which variant to choose for strings that have
[2011-11-30 14:54:48 - TestIO]        product variants
[2011-11-30 14:54:48 - TestIO]    --utf16
[2011-11-30 14:54:48 - TestIO]        changes default encoding for resources to UTF-16.  Only useful when API
[2011-11-30 14:54:48 - TestIO]        level is set to 7 or higher where the default encoding is UTF-8.
[2011-11-30 14:54:48 - TestIO]    --non-constant-id
[2011-11-30 14:54:48 - TestIO]        Make the resources ID non constant. This is required to make an R java class
[2011-11-30 14:54:48 - TestIO]        that does not contain the final value but is used to make reusable compiled
[2011-11-30 14:54:48 - TestIO]        libraries that need to access resources.

解决方案 »

  1.   

    你的程序有问题生成的apk自然不能正常安装了,你的程序怎么会跑得起来呢。摆脱给点log信息异常,而不是console
      

  2.   

    that does not contain the final value but is used to make reusable compiled
    [2011-11-30 14:54:48 - TestIO] libraries that need to access resources
    你看到这句没,你不应该把工程当做一个libraries,打开工程的properties,选择android,找到isLibraries复选框,去掉勾选,Apply一下
      

  3.   

    原谅我的错误回答
    事实上这种情况是因为SDK tools和ADT 版本不对应的原因
    参考:http://developer.android.com/sdk/tools-notes.html,滚动到“Dependencies:”