Android error collection (ing ...)

Source: Internet
Author: User

Android error collection (ing ...)

 

 



System Environment:

 

64-bit Windows 7

Problem description:

The Eclipse real machine cannot print log information

Error message:

Solution:

Window --> show view --> android-> devices,

Open devices and click the screenshot icon on the right. When it appears, logcat will generate information (not always useful)

System Environment:

64-bit Windows 7

Problem description:

Errors in xml (Resource) files

Error message:

Android: invalid start tag xxxxx error cause

Solution:

This error is always prompted for the xml file created in the result of learning the shape attribute today.
I was puzzled and found the reason.
I put this xml file in the wrong location and put it under the res/layout path.
It should be placed in the drawable path.

System Environment:

64-bit Windows 7

Problem description:

Unable to run the project

Error message:

Conversion to Dalvik format failed with error 1

Solution:

In the first case, the package is imported incorrectly. Click project --> build path --> libraries --> select android1.x or android2.x, and click remove.
Then click add library --> User Library --> next --> User Libraries --> new. You can get a name like android2.1 and click OK,
Select android2.1 --> add jars --> android-sdk-windowsplatformsandroid-7android.jar click to open, click OK --> finish.

In the second case, the signature fails. Signature: java-jar signapk. jar platform. x509.pem platform. pk8 e: worker workspaceappsinhua.apk e: worker workspaceappsin1__signaed.apk,

If the hua_signaed.apksignature fails, delete __signaed.apk in your work directory.

In the third case, the package conflicts. Please go to the project directory to delete the same package and re-import it. This is similar to the first case, but this is for other packages, not android packages.

System Environment:

64-bit Windows 7

Problem description:

Import the actionbarsherlock package on which SlidingMenu and SlidingMenu depend, and then import support v7 (to support ActionBar). The project always reports an error and cannot generate the R file.

Error message:

.....

Solution:

You do not need to import the v7 package because actionbarsherlock already supports ActionBar and there will be conflicts when importing v7.

 

System Environment:

64-bit Windows 7

Problem description:

FragmentTransaction usage problems.

Error message:

 

Java. lang. IllegalStateException: commit already called.

Solution:

Because your ft transaction is a global variable and can only be committed once.

Therefore, use two local ft transactions for commit. Http://blog.csdn.net/knxw0001/article/details/9363411 supplement: FragmentManager fragmentManager = getSupportFragmentManager (); FragmentTransaction fragmentTransaction = fragmentManager. beginTransaction (); detailFragment = new ProductDetailFragment (productId); commentFragment = new ProductCommentFragment (productId); fragmentTransaction. add (R. id. viewgroup, detailFragment); fragmentTransaction. add (R. id. viewgroup, commentFragment); fragmentTransaction. commit (); // the following code uses the new local variable getSupportFragmentManager () for calling (). beginTransaction (). hide (commentFragment ). show (detailFragment ). commit ();  

System Environment:

64-bit Windows 7

Problem description:

Error in debugging with Genymotion INSTALL_FAILED_CPU_ABI_INCOMPATIBLE

Error message:

 

Installation error: INSTALL_FAILED_CPU_ABI_INCOMPATIBLE

Please check logcat output for more details.

Launch canceled!

Solution:

Click to download genymotion-arm-translation.zip

Run your Vm, drag the downloaded zip package to the VM window, and click OK. Restart your VM.

System Environment:

64-bit Windows 7

Problem description:

The custom View (RemoteViews) cannot send a notification, and the program reports an error.

Error message:

Android. app. RemoteServiceException: Bad notification posted from packageCom. gdut. repairsystem:Couldn't expand RemoteViewsFor: StatusBarNotification (package = com. gdut. repairsystem id = 0 tag = null notification = Notification (vibrate = null, sound = null, defaults = 0x0, flags = 0x10 ))

Solution:

A self-held component is used in the custom Layout (this is why the custom style is used !!! (The layout on the outermost layer cannot be used, but the layout on the outer layer can be used ))

System Environment:

64-bit Windows 7

Problem description:

In the jni code: Type Method 'newstringutf' cocould not be resolved

Error message:

Type Method 'newstringutf' cocould not be resolved

Solution:

Open the problems window and delete this error. OK!

System Environment:

64-bit Windows 7

Problem description:

An error is reported when intent uses serializable to transmit complex data.

Error message:

Parcelable encountered IOException writing serializable object

Solution:

The serializable interface must be used to transmit data between activities.

System Environment:

64-bit Windows 7

Problem description:

An error is reported when intent uses Parcelable to transmit complex data.

Error message:

Unmarshalling unknown type code 7471205 at offset 232

Solution:

This error occurs when you pass an ArrayList that implements Parcelable between two activitiy types. However, when I pass other types of data (int and String), there is no problem, apparently, the problem encountered Parcelable, and I simply found the answer.

System Environment:

64-bit Windows 7

Problem description:

Always incorrect when using the open-source control NumberPicker and inflate

Error message:

Android-Error inflating SimonVT NumberPicker class in my layout xml

Solution:

The numberPickerStyle item of the activity topic (the topic of numberpicker) needs to use the topic in its project! Potholes ···

@ Style/NPWidget. Holo. NumberPicker

System Environment:

64-bit Windows 7

Problem description:

An error occurred while creating a searchview using sherlockactionbar.

Error message:

Sherlockactionbar Binary XML file line #29: Error inflating class

Solution:

Other resource folders such as values-v11 do not use the theme of the sherlockactionbar !!!

System Environment:

64-bit system, Ubuntu12.04

Problem description:

After the android environment is set up and the sdk path is specified, an error is still reported. After the JDK and Android environments are set up and the android SDK is copied, the adb and other commands in the sdk cannot be used.

Error message:

Android-sdk-linux_86/platform-tools/adb: No file or directory.

Android-sdk-linux/platform-tools/adb: the file or directory does not exist.

AndroidSDK/sdk/build-tools/19.0.1/aapt: error while loading shared libraries:

Failed to get the adb version: Cannot run program/home/android-sdk-linux/platform-tools/adb: error = 2, no such file or directory

Solution:

Because it is 64 bit system, and Android sdk only 32 bit program, need to install ia32-libs, can use.

Run the following command:

# sudo apt-get install ia32-libs

 

SlidingMenu and ActionBarSherLock compilation problems

1. The new SlidingMenu-master version needs to be compiled using google api.

2. After the library of SlidingMenu is compiled, use the compiled ActionBarSherLock as a library to import SlidingMenu.

The import method is right-click-properties-android-add-and select ActionBarSherLock. Because the sshortingmenu will be imported to your project later in the form of liberary, select is a liberary here.

3. Create a project and import SlidingMunu as liberary. The method is the same as above.

4. The getSupportActionBar and other ActionBarSherLock methods may not be found. The reason is that the Activity that uses ActionBarSherLock must inherit from SherlockActivity. Modify the singingfragmentactivity in SlidingMenu liberary to inherit from the SherlockFragmentActivity and re-compile the liberary import.

5. Project Red Cross or Red exclamation point: Delete the support_v4 package. ActionBarSherLock contains this package, which may conflict with each other. It may also be a theme issue. Check whether the appication theme is correct. Refer to exsample.

6. Replace ActionBar and some Fragment with classes in the ActionBarSherLock package.

7. The upper left corner indicates that the image is set in the style referenced by application theme.

8. actionBar. setNavigationMode sets different Listening Classes for different modes.

System Environment:

64-bit system, Ubuntu12.04

Problem description:The real machine connection cannot be identified. Error message:

Adb devices

List of devices attached
????????????No permissions

Solution:
1. Set usb Permissions
$ Lsusb
Bus 005 Device 001: ID 1d6b: 0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b: 0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b: 0001 Linux Foundation 1.1 root hub
Bus 002 Device 004: ID 093a: 2510 Pixart Imaging, Inc. hamoptical Mouse
Bus 002 Device 002: ID 413c: 2003 Dell Computer Corp. Keyboard
Bus 002 Device 001: ID 1d6b: 0001 Linux Foundation 1.1 root hub
Bus 001 Device 022: ID 0fce: 6146 Sony Ericsson Mobile Communications AB
Bus 001 Device 001: ID 1d6b: 0002 Linux Foundation 2.0 root hub
In the list, Bus 001 Device 022: ID 0fce: 6146 Sony Ericsson Mobile Communications AB. This line uses the usb port of the Mobile phone. record that the id is 0fce.

Sudo gedit/etc/udev/rules. d/70-android.rules
Add the following content:
SUBSYSTEM = usb, ATTRS {idVendor} =0fce, ATTRS {idProduct} = 6146, MODE = 0666
Run the following command to restart udev:
Sudo chmod a + rx/etc/udev/rules. d/70-android.rules
Sudo service udev restart

2. Unplug the usb and connect it again:

// Restart the adb server
Sudo./adb kill-server
./Adb devices
./Adb root

Set
Adb devices
List of devices attached
434242513151564c4d45 device

 

 

 

 





Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.