'2017/05'에 해당되는 글 2건

original link : http://techqa.info/programming/question/28285850/Opensuse-13-1-build-envsetup-sh--syntax-error-near-unexpected-token------r--



Error:

bash: build/envsetup.sh: line 1: syntax error near unexpected token $'{\r'' 'ash: build/envsetup.sh: line 1:function hmm() {


Solve:

The problem comes from Windows end-of-lines (EOL) so you'll have to convert all scripts to unix-style EOL through dos2unix (run apt-get install dos2unix on Ubuntu) and then convert your scripts:

dos2unix build/envsetup.sh sdk/bash_completion/adb.bash

Then all vendorsetup.sh (that will prevent the "command not found" error you get):

find device/ -name vendorsetup.sh -exec dos2unix {} \;

And one last to run the choosecombo script:

dos2unix build/core/find-jdk-tools-jar.sh

EDIT: In order to finish the overall compilation, the exhaustive conversion:

find . -name '*.sh' -exec dos2unix {} \;
find . -name '*.py' -exec dos2unix {} \;
find . -name '*.c' -exec dos2unix {} \;
find . -name '*.h' -exec dos2unix {} \;
find . -name '*.cpp' -exec dos2unix {} \;
find . -name '*.hpp' -exec dos2unix {} \;
find . -name '*.txt' -exec dos2unix {} \;
find . -name 'Config.in' -exec dos2unix {} \;
find . -name 'Config.src' -exec dos2unix {} \;
find . -name 'Makefile' -exec dos2unix {} \;
find . -name 'mkmakefile' -exec dos2unix {} \;
find . -name 'Kconfig*' -exec dos2unix {} \;
find . -name rmtypedefs -exec dos2unix {} \;
find . -name apicheck -exec dos2unix {} \;
find . -name seapp_contexts -exec dos2unix {} \;
dos2unix external/busybox/scripts/* external/busybox/applets/* kernel/scripts/* dalvik/dx/etc/* prebuilts/sdk/tools/*

The *.sh for all shell scripts, and *.py for all python scripts (used during make compilation), as well as .c and .cpp file (obviously) and other files used by makefiles.

Of course you could go the over-overkill find . -type f -exec dos2unix -s -k -o {} \; and let dos2unix decide which files are text and which are binary.

There might be other. I'll edit this answer as I find new ones...

저작자 표시 비영리 동일 조건 변경 허락
신고
Posted by bluelimn

Error:


Checking API: checkapi-last

out/target/common/obj/PACKAGING/public_api.txt:23556: error 12: Class android.telephony.gsm.SmsMessage changed static qualifier

prebuilts/sdk/api/19.txt:23513: error 9: Removed public constructor SmsMessage()

prebuilts/sdk/api/19.txt:23514: error 9: Removed public method android.telephony.gsm.SmsMessage.calculateLength

prebuilts/sdk/api/19.txt:23515: error 9: Removed public method android.telephony.gsm.SmsMessage.calculateLength

prebuilts/sdk/api/19.txt:23516: error 9: Removed public method android.telephony.gsm.SmsMessage.createFromPdu

prebuilts/sdk/api/19.txt:23517: error 9: Removed public method android.telephony.gsm.SmsMessage.getDisplayMessageBody

prebuilts/sdk/api/19.txt:23518: error 9: Removed public method android.telephony.gsm.SmsMessage.getDisplayOriginatingAddress

prebuilts/sdk/api/19.txt:23519: error 9: Removed public method android.telephony.gsm.SmsMessage.getEmailBody

prebuilts/sdk/api/19.txt:23520: error 9: Removed public method android.telephony.gsm.SmsMessage.getEmailFrom

prebuilts/sdk/api/19.txt:23521: error 9: Removed public method android.telephony.gsm.SmsMessage.getIndexOnSim

prebuilts/sdk/api/19.txt:23522: error 9: Removed public method android.telephony.gsm.SmsMessage.getMessageBody

prebuilts/sdk/api/19.txt:23523: error 9: Removed public method android.telephony.gsm.SmsMessage.getMessageClass

prebuilts/sdk/api/19.txt:23524: error 9: Removed public method android.telephony.gsm.SmsMessage.getOriginatingAddress

prebuilts/sdk/api/19.txt:23525: error 9: Removed public method android.telephony.gsm.SmsMessage.getPdu

prebuilts/sdk/api/19.txt:23526: error 9: Removed public method android.telephony.gsm.SmsMessage.getProtocolIdentifier

prebuilts/sdk/api/19.txt:23527: error 9: Removed public method android.telephony.gsm.SmsMessage.getPseudoSubject

prebuilts/sdk/api/19.txt:23528: error 9: Removed public method android.telephony.gsm.SmsMessage.getServiceCenterAddress

prebuilts/sdk/api/19.txt:23529: error 9: Removed public method android.telephony.gsm.SmsMessage.getStatus

prebuilts/sdk/api/19.txt:23530: error 9: Removed public method android.telephony.gsm.SmsMessage.getStatusOnSim

prebuilts/sdk/api/19.txt:23531: error 9: Removed public method android.telephony.gsm.SmsMessage.getSubmitPdu

prebuilts/sdk/api/19.txt:23532: error 9: Removed public method android.telephony.gsm.SmsMessage.getSubmitPdu

prebuilts/sdk/api/19.txt:23533: error 9: Removed public method android.telephony.gsm.SmsMessage.getTPLayerLengthForPDU

prebuilts/sdk/api/19.txt:23534: error 9: Removed public method android.telephony.gsm.SmsMessage.getTimestampMillis

prebuilts/sdk/api/19.txt:23535: error 9: Removed public method android.telephony.gsm.SmsMessage.getUserData

prebuilts/sdk/api/19.txt:23536: error 9: Removed public method android.telephony.gsm.SmsMessage.isCphsMwiMessage

prebuilts/sdk/api/19.txt:23537: error 9: Removed public method android.telephony.gsm.SmsMessage.isEmail

prebuilts/sdk/api/19.txt:23538: error 9: Removed public method android.telephony.gsm.SmsMessage.isMWIClearMessage

prebuilts/sdk/api/19.txt:23539: error 9: Removed public method android.telephony.gsm.SmsMessage.isMWISetMessage

prebuilts/sdk/api/19.txt:23540: error 9: Removed public method android.telephony.gsm.SmsMessage.isMwiDontStore

prebuilts/sdk/api/19.txt:23541: error 9: Removed public method android.telephony.gsm.SmsMessage.isReplace

prebuilts/sdk/api/19.txt:23542: error 9: Removed public method android.telephony.gsm.SmsMessage.isReplyPathPresent

prebuilts/sdk/api/19.txt:23543: error 9: Removed public method android.telephony.gsm.SmsMessage.isStatusReportMessage

prebuilts/sdk/api/19.txt:23544: error 10: Removed field android.telephony.gsm.SmsMessage.ENCODING_16BIT

prebuilts/sdk/api/19.txt:23545: error 10: Removed field android.telephony.gsm.SmsMessage.ENCODING_7BIT

prebuilts/sdk/api/19.txt:23546: error 10: Removed field android.telephony.gsm.SmsMessage.ENCODING_8BIT

prebuilts/sdk/api/19.txt:23547: error 10: Removed field android.telephony.gsm.SmsMessage.ENCODING_UNKNOWN

prebuilts/sdk/api/19.txt:23548: error 10: Removed field android.telephony.gsm.SmsMessage.MAX_USER_DATA_BYTES

prebuilts/sdk/api/19.txt:23549: error 10: Removed field android.telephony.gsm.SmsMessage.MAX_USER_DATA_SEPTETS

prebuilts/sdk/api/19.txt:23550: error 10: Removed field android.telephony.gsm.SmsMessage.MAX_USER_DATA_SEPTETS_WITH_HEADER


******************************

You have tried to change the API from what has been previously released in

an SDK.  Please fix the errors listed above.

******************************


Solution:


1. change javadoc

$sudo update-alternatives --install "/usr/bin/javadoc" "javadoc" "/usr/local/jdk1.6.0_45/bin/javadoc" 1;


$sudo update-alternatives --config javadoc


2. update API

$make update-api



저작자 표시 비영리 동일 조건 변경 허락
신고
Posted by bluelimn
1

bluelimn

달력

최근에 달린 댓글

최근에 받은 트래백

글보관함


티스토리 툴바