Android error 41 Solution

Source: Internet
Author: User
I encountered this error. I saw the solution in a Foreign Forum and successfully solved the problem. I hope to help others.

Error:
Build/CORE/product_config.mk: 229: Warning: adding test OTA key
Host Java: clearsilver (Out/host/common/obj/java_libraries/
Clearsilver_intermediates/FIGSSES)
Unrecognized option: 9999999
Make: *** [out/host/common/obj/java_libraries/
Clearsilver_intermediates/JavaLib. jar]Error41

Cause:
According to the error message, it is probably a JavaVirtual Machine. Some people say that I have installed Java, but it cannot be used ,"AndroidRequires at least java5 with update 12... ", I installed Java 6, no problem.

Solution:
After installing Java 6
1. Configure the Java environment change volume. I installed it with the new version in ubuntu8.04. The default path is/usr/lib/JVM/Java-6-sun.
Open the. bashrc file under the root user
# Vi ~ /. Bashrc
Add

Export java_home =/usr/lib/JVM/Java-6-sun
Export android_java_home = $ java_home

Save and exit

2. Use update-Alter Native The S command changes the correct path to provide the Java service, because we may have installed several services that can provide java. Although Java 6 is installed, the path has not been changed, System We still use the old path, so we will find that the version is incorrect during Android editing.
Modify the example (replace alternatives with update-alternatives in Ubuntu ):
[Root @ vostro ~] # Alternatives -- config Java
There are 3 programs which provide 'java '.
Selection command
-----------------------------------------------
* + 1/usr/lib/JVM/jre-1.6.0-openjdk/bin/Java
2/usr/lib/JVM/jre-1.5.0-gcj/bin/Java
3/usr/Java/jdk1.6.0 _ 07/bin/Java
Enter to keep the current selection [+], or type selection number: 3

[Root @ vostro ~] # Alternatives -- config javac

There is 1 program that provides 'javac '.
Selection command
-----------------------------------------------
* + 1/usr/lib/JVM/java-1.5.0-gcj/bin/javac
Enter to keep the current selection [+], or type selection Number:
[Root @ vostro ~] # Alternatives -- config javac
There are 2 programs which provide 'javac '.
Selection command
-----------------------------------------------
* + 1/usr/lib/JVM/java-1.5.0-gcj/bin/javac
2/usr/Java/jdk1.6.0 _ 07/bin/javac
Enter to keep the current selection [+], or type selection number: 2

[Root @ vostro ~] # Javac-version
Javac 1.6.0 _ 07

[Root @ vostro ~] # Alternatives -- config jar

There is 1 program that provides 'jar '.
Selection command
-----------------------------------------------
* + 1/usr/Java/jdk1.6.0 _ 07/bin/jar
Enter to keep the current selection [+], or type selection Number:

Provide Java, javac, and jar servicesProgramChange all paths to jdk1.6.0 _ 07 (my options are/usr/lib/JVM/Java-6-sun/JRE/bin/Java ), that is, * and + are all moved to that location. In my system, only default selection can be changed. Later, I deleted other paths using Update-alternatives -- remove, current selection [+] has been changed. How to delete it is helpful.

Restart

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.