 |
BOOK: Beginning Android Application Development
 | This is the forum to discuss the Wrox book Beginning Android Application Development by Wei-Meng Lee; ISBN: 978-1-1180-1711-1 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning Android Application Development section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

February 6th, 2012, 05:33 PM
|
|
Authorized User
|
|
Join Date: Nov 2011
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I have the same error in every project in Chapter 5 up to and including
"Menus" project which does not involve images. I retested the projects in
chapters 1 thru 4 and they do not have any errors.
The error appears to occur as soon as I start the debug and I think maybe this error might have something to do with Eclipse itself. Any Ideas would be
appreciated.
|
|

February 6th, 2012, 07:27 PM
|
|
Authorized User
|
|
Join Date: Nov 2011
Posts: 86
Thanks: 3
Thanked 5 Times in 5 Posts
|
|
Hi ken
All I can say is look in LogCat. It should say something about the error. Copy the error messages and post them. Maybe then I can see some thing.
Eclipse seems to be very stable. I have not had any problems, other than figuring out how to run it.
Cliff
__________________
"Software to the Stars"
Failure is not an option. It comes bundled with your Microsoft products.
|
|

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

February 7th, 2012, 07:34 PM
|
|
Authorized User
|
|
Join Date: Nov 2011
Posts: 86
Thanks: 3
Thanked 5 Times in 5 Posts
|
|
Hi Ken
Wow. I have not seen anything like that. It would seen that there is something wrong in Eclipse, but what I have no clue.
At this point your best bet is taking this question to
http://stackoverflow.com/questions/tagged/android
There are people there who know there stuff.
Cliff
__________________
"Software to the Stars"
Failure is not an option. It comes bundled with your Microsoft products.
|
|

February 7th, 2012, 07:37 PM
|
|
Authorized User
|
|
Join Date: Nov 2011
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Project bug
I also should state that I look at the Log Cat and there is nothing in it. It looks
like the crash occurs immediately upon starting the test.
Ken Ford
|
|

February 9th, 2012, 10:06 AM
|
|
Authorized User
|
|
Join Date: Nov 2011
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Problem solved.
Problem solved! I reloaded Eclipse and the latest version of Java. Thanks for
all the advice.
Ken Ford
|
|

February 10th, 2012, 05:33 PM
|
|
Authorized User
|
|
Join Date: Nov 2011
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Java problem
My solution was premature. What i get now whenever I run any project including this one is:
[2012-02-10 14:28:27 - ddmlib] An established connection was aborted by the software in your host machine
java.io.IOException: An established connection was aborted by the software in your host machine
at sun.nio.ch.SocketDispatcher.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(Unknown Source)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(Unknown Source)
at sun.nio.ch.IOUtil.write(Unknown Source)
at sun.nio.ch.SocketChannelImpl.write(Unknown Source)
at com.android.ddmlib.JdwpPacket.writeAndConsume(Jdwp Packet.java:213)
at com.android.ddmlib.Client.sendAndConsume(Client.ja va:575)
at com.android.ddmlib.HandleHeap.sendREAQ(HandleHeap. java:348)
at com.android.ddmlib.Client.requestAllocationStatus( Client.java:421)
at com.android.ddmlib.DeviceMonitor.createClient(Devi ceMonitor.java:854)
at com.android.ddmlib.DeviceMonitor.openClient(Device Monitor.java:822)
at com.android.ddmlib.DeviceMonitor.processIncomingJd wpData(DeviceMonitor.java:781)
at com.android.ddmlib.DeviceMonitor.deviceClientMonit orLoop(DeviceMonitor.java:649)
at com.android.ddmlib.DeviceMonitor.access$100(Device Monitor.java:42)
at com.android.ddmlib.DeviceMonitor$3.run(DeviceMonit or.java:577)
|
|

February 27th, 2012, 02:28 PM
|
|
Registered User
|
|
Join Date: Feb 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Code problem from Wei-Meng Lee book!!!
Hello!!! I'm new here =) I got the book "Beginning Android Application Development 2011" and have a problem with the source code examples you can download with the book. When I import any of the example projects it shows it's full of errors. "Cant be resolved to type" errors on almost every line. I know I'm missing something basic here, but as I said I'm new and just learning. I already tried the refresh solution and deleted the R.java, but still the same. Here's the code, it's really simple... I shoved the error code next to the lines. These are not all the errors, but I think there is some simple solution to them all, something that I missed. I imported the project to my workspace through file - import! Any help would be really appreciated. Thanks in advance.
package net.learn2develop.Activities;
import android.app.Activity; <- error: The import android cannot be resolved
import android.os.Bundle;
import android.util.Log;
import android.view.Window;
import android.view.KeyEvent;
import android.widget.Toast;
import android.content.Intent;
public class MainActivity extends Activity { <- error: Activity cannot be resolved to a type
String tag = "Events";
int request_Code = 1;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) { <-Override cannot be resolved to a type
super.onCreate(savedInstanceState);
//---hides the title bar---
//requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.main);<-The method setContentView(int) is undefined for the type MainActivity
Log.d(tag, "In the onCreate() event");
}
public boolean onKeyDown(int keyCode, KeyEvent event)
{
if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER) <-KeyEvent cannot be resolved to a variable
{
//startActivity(new Intent("net.learn2develop.ACTIVITY2"));
//startActivity(new Intent(this, Activity2.class));
/*
startActivityForResult(new Intent(
"net.learn2develop.ACTIVITY2"),
request_Code);
*/
Intent i = new Intent("net.learn2develop.ACTIVITY2");
Bundle extras = new Bundle();
extras.putString("Name", "Your name here");
i.putExtras(extras);
startActivityForResult(i, 1);
}
return false;
}
public void onActivityResult(int requestCode, int resultCode, Intent data)
{
if (requestCode == request_Code) {
if (resultCode == RESULT_OK) {
Toast.makeText(this,data.getData().toString(),
Toast.LENGTH_SHORT).show();
}
}
}
public void onStart()
{
super.onStart();
Log.d(tag, "In the onStart() event");
}
public void onRestart()
{
super.onRestart();
Log.d(tag, "In the onRestart() event");
}
public void onResume()
{
super.onResume();
Log.d(tag, "In the onResume() event");
}
public void onPause()
{
super.onPause();
Log.d(tag, "In the onPause() event");
}
public void onStop()
{
super.onStop();
Log.d(tag, "In the onStop() event");
}
public void onDestroy()
{
super.onDestroy();
Log.d(tag, "In the onDestroy() event");
}
}
|
|

February 27th, 2012, 08:30 PM
|
|
Authorized User
|
|
Join Date: Nov 2011
Posts: 86
Thanks: 3
Thanked 5 Times in 5 Posts
|
|
Hi Cavecat
First you should start you own question. You will get better response.
The problem is :
Code:
import android.app.Activity; <- error: The import android cannot be resolved
I have a few suggestions.
Try moving that line to bottom of the imports and see if the error says with it. If it shifts to the new first line, look above that for an error.
else
What target are you asking for (2.3.3)? If you don't know look in the manifest file.
<uses-sdk android:minSdkVersion="10" /> 10 is 2.3.3
Open the Android SDK manger and make sure that you have downloaded all the files for that API. If all else fails, re-download that API.
Hope this helps
Cliff
__________________
"Software to the Stars"
Failure is not an option. It comes bundled with your Microsoft products.
|
|

February 28th, 2012, 09:27 AM
|
|
Registered User
|
|
Join Date: Feb 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Cliff2310 thank You for the reply. I tried your suggestion bus still nothing. In the manifest file it says minsdk version = 9. I currently have the 15th API version so I guess it must be OK. But I did download the 8th and the 10th API versions (there wasn't a 9th version in the list).
UPDATE (on the fly =) ): As I browsed around the project I stumbled across a property window for the class and there was a list of all the API's downloaded, but none of them were checked. As I remember I have to choose an API when I first create a project it struck me that I didn't create this project, but just imported it (a downloaded source of he book I'm reading), so I haven't specify any API. I checked the google API and everything is fine now. Thank You very much for the help, you directed me on the right way where to look for the problem, and API it was =)
Best regards,
Valters
|
|
 |
|