环境如题创建了一个android项目,没做任何进一步编程,运行时报错了

解决方案 »

  1.   

    [2012-10-25 10:11:53 - test] ERROR: Unknown command 'crunch'
    [2012-10-25 10:11:53 - test] Android Asset Packaging Tool
    [2012-10-25 10:11:53 - test] 
    [2012-10-25 10:11:53 - test] Usage:
    [2012-10-25 10:11:53 - test]  aapt l[ist] [-v] [-a] file.{zip,jar,apk}
    [2012-10-25 10:11:53 - test]    List contents of Zip-compatible archive.
    [2012-10-25 10:11:53 - test] 
    [2012-10-25 10:11:53 - test]  aapt d[ump] [--values] WHAT file.{apk} [asset [asset ...]]
    [2012-10-25 10:11:53 - test]    badging          Print the label and icon for the app declared in APK.
    [2012-10-25 10:11:53 - test]    permissions      Print the permissions from the APK.
    [2012-10-25 10:11:53 - test]    resources        Print the resource table from the APK.
    [2012-10-25 10:11:53 - test]    configurations   Print the configurations in the APK.
    [2012-10-25 10:11:53 - test]    xmltree          Print the compiled xmls in the given assets.
    [2012-10-25 10:11:53 - test]    xmlstrings       Print the strings of the given compiled xml assets.
    [2012-10-25 10:11:53 - test] 
    [2012-10-25 10:11:53 - test]  aapt p[ackage] [-d][-f][-m][-u][-v][-x][-z][-M AndroidManifest.xml] \
    [2012-10-25 10:11:53 - test]         [-0 extension [-0 extension ...]] [-g tolerance] [-j jarfile] \
    [2012-10-25 10:11:53 - test]         [--debug-mode] [--min-sdk-version VAL] [--target-sdk-version VAL] \
    [2012-10-25 10:11:53 - test]         [--app-version VAL] [--app-version-name TEXT] [--custom-package VAL] \
    [2012-10-25 10:11:53 - test]         [--rename-manifest-package PACKAGE] \
    [2012-10-25 10:11:53 - test]         [--rename-instrumentation-target-package PACKAGE] \
    [2012-10-25 10:11:53 - test]         [--utf16] [--auto-add-overlay] \
    [2012-10-25 10:11:53 - test]         [--max-res-version VAL] \
    [2012-10-25 10:11:53 - test]         [-I base-package [-I base-package ...]] \
    [2012-10-25 10:11:53 - test]         [-A asset-source-dir]  [-G class-list-file] [-P public-definitions-file] \
    [2012-10-25 10:11:53 - test]         [-S resource-sources [-S resource-sources ...]]         [-F apk-file] [-J R-file-dir] \
    [2012-10-25 10:11:53 - test]         [--product product1,product2,...] \
    [2012-10-25 10:11:53 - test]         [raw-files-dir [raw-files-dir] ...]
    [2012-10-25 10:11:53 - test] 
    [2012-10-25 10:11:53 - test]    Package the android resources.  It will read assets and resources that are
    [2012-10-25 10:11:53 - test]    supplied with the -M -A -S or raw-files-dir arguments.  The -J -P -F and -R
    [2012-10-25 10:11:53 - test]    options control which files are output.
    [2012-10-25 10:11:53 - test] 
    [2012-10-25 10:11:53 - test]  aapt r[emove] [-v] file.{zip,jar,apk} file1 [file2 ...]
    [2012-10-25 10:11:53 - test]    Delete specified files from Zip-compatible archive.
    [2012-10-25 10:11:53 - test] 
    [2012-10-25 10:11:53 - test]  aapt a[dd] [-v] file.{zip,jar,apk} file1 [file2 ...]
    [2012-10-25 10:11:53 - test]    Add specified files to Zip-compatible archive.
    [2012-10-25 10:11:53 - test] 
    [2012-10-25 10:11:53 - test]  aapt v[ersion]
    [2012-10-25 10:11:53 - test]    Print program version.
    [2012-10-25 10:11:53 - test] 
    [2012-10-25 10:11:53 - test]  Modifiers:
    [2012-10-25 10:11:53 - test]    -a  print Android-specific data (resources, manifest) when listing
    [2012-10-25 10:11:53 - test]    -c  specify which configurations to include.  The default is all
    [2012-10-25 10:11:53 - test]        configurations.  The value of the parameter should be a comma
    [2012-10-25 10:11:53 - test]        separated list of configuration values.  Locales should be specified
    [2012-10-25 10:11:53 - test]        as either a language or language-region pair.  Some examples:
    [2012-10-25 10:11:53 - test]             en
    [2012-10-25 10:11:53 - test]             port,en
    [2012-10-25 10:11:53 - test]             port,land,en_US
    [2012-10-25 10:11:53 - test]        If you put the special locale, zz_ZZ on the list, it will perform
    [2012-10-25 10:11:53 - test]        pseudolocalization on the default locale, modifying all of the
    [2012-10-25 10:11:53 - test]        strings so you can look for strings that missed the
    [2012-10-25 10:11:53 - test]        internationalization process.  For example:
    [2012-10-25 10:11:53 - test]             port,land,zz_ZZ
    [2012-10-25 10:11:53 - test]    -d  one or more device assets to include, separated by commas
    [2012-10-25 10:11:53 - test]    -f  force overwrite of existing files
    [2012-10-25 10:11:53 - test]    -g  specify a pixel tolerance to force images to grayscale, default 0
    [2012-10-25 10:11:53 - test]    -j  specify a jar or zip file containing classes to include
    [2012-10-25 10:11:53 - test]    -k  junk path of file(s) added
    [2012-10-25 10:11:53 - test]    -m  make package directories under location specified by -J
    [2012-10-25 10:11:53 - test]    -u  update existing packages (add new, replace older, remove deleted files)
    [2012-10-25 10:11:53 - test]    -v  verbose output
    [2012-10-25 10:11:53 - test]    -x  create extending (non-application) resource IDs
    [2012-10-25 10:11:53 - test]    -z  require localization of resource attributes ed with
    [2012-10-25 10:11:53 - test]        localization="suggested"
    [2012-10-25 10:11:53 - test]    -A  additional directory in which to find raw asset files
    [2012-10-25 10:11:53 - test]    -G  A file to output proguard options into.
    [2012-10-25 10:11:53 - test]    -F  specify the apk file to output
    [2012-10-25 10:11:53 - test]    -I  add an existing package to base include set
    [2012-10-25 10:11:53 - test]    -J  specify where to output R.java resource constant definitions
    [2012-10-25 10:11:53 - test]    -M  specify full path to AndroidManifest.xml to include in zip
    [2012-10-25 10:11:53 - test]    -P  specify where to output public resource definitions
    [2012-10-25 10:11:53 - test]    -S  directory in which to find resources.  Multiple directories will be scanned
    [2012-10-25 10:11:53 - test]        and the first match found (left to right) will take precedence.
    [2012-10-25 10:11:53 - test]    -0  specifies an additional extension for which such files will not
    [2012-10-25 10:11:53 - test]        be stored compressed in the .apk.  An empty string means to not
    [2012-10-25 10:11:53 - test]        compress any files at all.
    [2012-10-25 10:11:53 - test]    --debug-mode
    [2012-10-25 10:11:53 - test]        inserts android:debuggable="true" in to the application node of the
    [2012-10-25 10:11:53 - test]        manifest, making the application debuggable even on production devices.
    [2012-10-25 10:11:53 - test]    --min-sdk-version
    [2012-10-25 10:11:53 - test]        inserts android:minSdkVersion in to manifest.  If the version is 7 or
    [2012-10-25 10:11:53 - test]        higher, the default encoding for resources will be in UTF-8.
    [2012-10-25 10:11:53 - test]    --target-sdk-version
    [2012-10-25 10:11:53 - test]        inserts android:targetSdkVersion in to manifest.
    [2012-10-25 10:11:53 - test]    --max-res-version
    [2012-10-25 10:11:53 - test]        ignores versioned resource directories above the given value.
    [2012-10-25 10:11:53 - test]    --values
    [2012-10-25 10:11:53 - test]        when used with "dump resources" also includes resource values.
    [2012-10-25 10:11:53 - test]    --version-code
    [2012-10-25 10:11:53 - test]        inserts android:versionCode in to manifest.
    [2012-10-25 10:11:53 - test]    --version-name
    [2012-10-25 10:11:53 - test]        inserts android:versionName in to manifest.
    [2012-10-25 10:11:53 - test]    --custom-package
    [2012-10-25 10:11:53 - test]        generates R.java into a different package.
    [2012-10-25 10:11:53 - test]    --auto-add-overlay
    [2012-10-25 10:11:53 - test]        Automatically add resources that are only in overlays.
    [2012-10-25 10:11:53 - test]    --rename-manifest-package
    [2012-10-25 10:11:53 - test]        Rewrite the manifest so that its package name is the package name
    [2012-10-25 10:11:53 - test]        given here.  Relative class names (for example .Foo) will be
    [2012-10-25 10:11:53 - test]        changed to absolute names with the old package so that the code
    [2012-10-25 10:11:53 - test]        does not need to change.
    [2012-10-25 10:11:53 - test]    --rename-instrumentation-target-package
    [2012-10-25 10:11:53 - test]        Rewrite the manifest so that all of its instrumentation
    [2012-10-25 10:11:53 - test]        components target the given package.  Useful when used in
    [2012-10-25 10:11:53 - test]        conjunction with --rename-manifest-package to fix tests against
    [2012-10-25 10:11:53 - test]        a package that has been renamed.
    [2012-10-25 10:11:53 - test]    --product
    [2012-10-25 10:11:53 - test]        Specifies which variant to choose for strings that have
    [2012-10-25 10:11:53 - test]        product variants
    [2012-10-25 10:11:53 - test]    --utf16
    [2012-10-25 10:11:53 - test]        changes default encoding for resources to UTF-16.  Only useful when API
    [2012-10-25 10:11:53 - test]        level is set to 7 or higher where the default encoding is UTF-8.
      

  2.   


    [2012-10-25 10:11:53 - test] ERROR: Unknown option '--no-crunch'
    [2012-10-25 10:11:53 - test] Android Asset Packaging Tool
    [2012-10-25 10:11:53 - test] 
    [2012-10-25 10:11:53 - test] Usage:
    [2012-10-25 10:11:53 - test]  aapt l[ist] [-v] [-a] file.{zip,jar,apk}
    [2012-10-25 10:11:53 - test]    List contents of Zip-compatible archive.
    [2012-10-25 10:11:53 - test] 
    [2012-10-25 10:11:53 - test]  aapt d[ump] [--values] WHAT file.{apk} [asset [asset ...]]
    [2012-10-25 10:11:53 - test]    badging          Print the label and icon for the app declared in APK.
    [2012-10-25 10:11:53 - test]    permissions      Print the permissions from the APK.
    [2012-10-25 10:11:53 - test]    resources        Print the resource table from the APK.
    [2012-10-25 10:11:53 - test]    configurations   Print the configurations in the APK.
    [2012-10-25 10:11:53 - test]    xmltree          Print the compiled xmls in the given assets.
    [2012-10-25 10:11:53 - test]    xmlstrings       Print the strings of the given compiled xml assets.
    [2012-10-25 10:11:53 - test] 
    [2012-10-25 10:11:53 - test]  aapt p[ackage] [-d][-f][-m][-u][-v][-x][-z][-M AndroidManifest.xml] \
    [2012-10-25 10:11:53 - test]         [-0 extension [-0 extension ...]] [-g tolerance] [-j jarfile] \
    [2012-10-25 10:11:53 - test]         [--debug-mode] [--min-sdk-version VAL] [--target-sdk-version VAL] \
    [2012-10-25 10:11:53 - test]         [--app-version VAL] [--app-version-name TEXT] [--custom-package VAL] \
    [2012-10-25 10:11:53 - test]         [--rename-manifest-package PACKAGE] \
    [2012-10-25 10:11:53 - test]         [--rename-instrumentation-target-package PACKAGE] \
    [2012-10-25 10:11:53 - test]         [--utf16] [--auto-add-overlay] \
    [2012-10-25 10:11:53 - test]         [--max-res-version VAL] \
    [2012-10-25 10:11:53 - test]         [-I base-package [-I base-package ...]] \
    [2012-10-25 10:11:53 - test]         [-A asset-source-dir]  [-G class-list-file] [-P public-definitions-file] \
    [2012-10-25 10:11:53 - test]         [-S resource-sources [-S resource-sources ...]]         [-F apk-file] [-J R-file-dir] \
    [2012-10-25 10:11:53 - test]         [--product product1,product2,...] \
    [2012-10-25 10:11:53 - test]         [raw-files-dir [raw-files-dir] ...]
    [2012-10-25 10:11:53 - test] 
    [2012-10-25 10:11:53 - test]    Package the android resources.  It will read assets and resources that are
    [2012-10-25 10:11:53 - test]    supplied with the -M -A -S or raw-files-dir arguments.  The -J -P -F and -R
    [2012-10-25 10:11:53 - test]    options control which files are output.
    [2012-10-25 10:11:53 - test] 
    [2012-10-25 10:11:53 - test]  aapt r[emove] [-v] file.{zip,jar,apk} file1 [file2 ...]
    [2012-10-25 10:11:53 - test]    Delete specified files from Zip-compatible archive.
    [2012-10-25 10:11:53 - test] 
    [2012-10-25 10:11:53 - test]  aapt a[dd] [-v] file.{zip,jar,apk} file1 [file2 ...]
    [2012-10-25 10:11:53 - test]    Add specified files to Zip-compatible archive.
    [2012-10-25 10:11:53 - test] 
    [2012-10-25 10:11:53 - test]  aapt v[ersion]
    [2012-10-25 10:11:53 - test]    Print program version.
    [2012-10-25 10:11:53 - test] 
    [2012-10-25 10:11:53 - test]  Modifiers:
    [2012-10-25 10:11:53 - test]    -a  print Android-specific data (resources, manifest) when listing
    [2012-10-25 10:11:53 - test]    -c  specify which configurations to include.  The default is all
    [2012-10-25 10:11:53 - test]        configurations.  The value of the parameter should be a comma
    [2012-10-25 10:11:53 - test]        separated list of configuration values.  Locales should be specified
    [2012-10-25 10:11:53 - test]        as either a language or language-region pair.  Some examples:
    [2012-10-25 10:11:53 - test]             en
    [2012-10-25 10:11:53 - test]             port,en
    [2012-10-25 10:11:53 - test]             port,land,en_US
    [2012-10-25 10:11:53 - test]        If you put the special locale, zz_ZZ on the list, it will perform
    [2012-10-25 10:11:53 - test]        pseudolocalization on the default locale, modifying all of the
    [2012-10-25 10:11:53 - test]        strings so you can look for strings that missed the
    [2012-10-25 10:11:53 - test]        internationalization process.  For example:
    [2012-10-25 10:11:53 - test]             port,land,zz_ZZ
    [2012-10-25 10:11:53 - test]    -d  one or more device assets to include, separated by commas
    [2012-10-25 10:11:53 - test]    -f  force overwrite of existing files
    [2012-10-25 10:11:53 - test]    -g  specify a pixel tolerance to force images to grayscale, default 0
    [2012-10-25 10:11:53 - test]    -j  specify a jar or zip file containing classes to include
    [2012-10-25 10:11:53 - test]    -k  junk path of file(s) added
    [2012-10-25 10:11:53 - test]    -m  make package directories under location specified by -J
    [2012-10-25 10:11:53 - test]    -u  update existing packages (add new, replace older, remove deleted files)
    [2012-10-25 10:11:53 - test]    -v  verbose output
    [2012-10-25 10:11:53 - test]    -x  create extending (non-application) resource IDs
    [2012-10-25 10:11:53 - test]    -z  require localization of resource attributes ed with
    [2012-10-25 10:11:53 - test]        localization="suggested"
    [2012-10-25 10:11:53 - test]    -A  additional directory in which to find raw asset files
    [2012-10-25 10:11:53 - test]    -G  A file to output proguard options into.
    [2012-10-25 10:11:53 - test]    -F  specify the apk file to output
    [2012-10-25 10:11:53 - test]    -I  add an existing package to base include set
    [2012-10-25 10:11:53 - test]    -J  specify where to output R.java resource constant definitions
    [2012-10-25 10:11:53 - test]    -M  specify full path to AndroidManifest.xml to include in zip
    [2012-10-25 10:11:53 - test]    -P  specify where to output public resource definitions
    [2012-10-25 10:11:53 - test]    -S  directory in which to find resources.  Multiple directories will be scanned
    [2012-10-25 10:11:53 - test]        and the first match found (left to right) will take precedence.
    [2012-10-25 10:11:53 - test]    -0  specifies an additional extension for which such files will not
    [2012-10-25 10:11:53 - test]        be stored compressed in the .apk.  An empty string means to not
    [2012-10-25 10:11:53 - test]        compress any files at all.
    [2012-10-25 10:11:53 - test]    --debug-mode
    [2012-10-25 10:11:53 - test]        inserts android:debuggable="true" in to the application node of the
    [2012-10-25 10:11:53 - test]        manifest, making the application debuggable even on production devices.
    [2012-10-25 10:11:53 - test]    --min-sdk-version
    [2012-10-25 10:11:53 - test]        inserts android:minSdkVersion in to manifest.  If the version is 7 or
    [2012-10-25 10:11:53 - test]        higher, the default encoding for resources will be in UTF-8.
    [2012-10-25 10:11:53 - test]    --target-sdk-version
    [2012-10-25 10:11:53 - test]        inserts android:targetSdkVersion in to manifest.
    [2012-10-25 10:11:53 - test]    --max-res-version
    [2012-10-25 10:11:53 - test]        ignores versioned resource directories above the given value.
    [2012-10-25 10:11:53 - test]    --values
    [2012-10-25 10:11:53 - test]        when used with "dump resources" also includes resource values.
    [2012-10-25 10:11:53 - test]    --version-code
    [2012-10-25 10:11:53 - test]        inserts android:versionCode in to manifest.
    [2012-10-25 10:11:53 - test]    --version-name
    [2012-10-25 10:11:53 - test]        inserts android:versionName in to manifest.
    [2012-10-25 10:11:53 - test]    --custom-package
    [2012-10-25 10:11:53 - test]        generates R.java into a different package.
    [2012-10-25 10:11:53 - test]    --auto-add-overlay
    [2012-10-25 10:11:53 - test]        Automatically add resources that are only in overlays.
    [2012-10-25 10:11:53 - test]    --rename-manifest-package
    [2012-10-25 10:11:53 - test]        Rewrite the manifest so that its package name is the package name
    [2012-10-25 10:11:53 - test]        given here.  Relative class names (for example .Foo) will be
    [2012-10-25 10:11:53 - test]        changed to absolute names with the old package so that the code
    [2012-10-25 10:11:53 - test]        does not need to change.
    [2012-10-25 10:11:53 - test]    --rename-instrumentation-target-package
    [2012-10-25 10:11:53 - test]        Rewrite the manifest so that all of its instrumentation
    [2012-10-25 10:11:53 - test]        components target the given package.  Useful when used in
    [2012-10-25 10:11:53 - test]        conjunction with --rename-manifest-package to fix tests against
    [2012-10-25 10:11:53 - test]        a package that has been renamed.
    [2012-10-25 10:11:53 - test]    --product
    [2012-10-25 10:11:53 - test]        Specifies which variant to choose for strings that have
    [2012-10-25 10:11:53 - test]        product variants
    [2012-10-25 10:11:53 - test]    --utf16
    [2012-10-25 10:11:53 - test]        changes default encoding for resources to UTF-16.  Only useful when API
    [2012-10-25 10:11:53 - test]        level is set to 7 or higher where the default encoding is UTF-8.
      

  3.   

    sdk用最新的,adt用最新的,估计就行了。
      

  4.   

    sdk用最新的,adt升级到最新的 我用的就是64位的系统