Build error on 6.0.1 M4B30Z because of API change

Currently trying to build android-6.0.1 M4B30Z. I've checked out the
sources and made no modifications. However, when compiling I get the
following error.


Ubuntu 14.04 OpenJDK 7 Android 6.0,1 M4B30Z


out/target/common/obj/PACKAGING/public_api.txt:52616: error 4: Added
public constructor
java.util.concurrent.ThreadPoolExecutor.DiscardPolicy.DiscardPolicy()
out/target/common/obj/PACKAGING/public_api.txt:52883: error 4: Added
public constructor
java.util.concurrent.locks.AbstractQueuedLongSynchronizer.ConditionObject.ConditionObject()
out/target/common/obj/PACKAGING/public_api.txt:52930: error 4: Added
public constructor
java.util.concurrent.locks.AbstractQueuedSynchronizer.ConditionObject.ConditionObject()
out/target/common/obj/PACKAGING/public_api.txt:53025: error 4: Added
public constructor
java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock.ReadLock(ReentrantReadWriteLock)
out/target/common/obj/PACKAGING/public_api.txt:53035: error 4: Added
public constructor
java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock.WriteLock(ReentrantReadWriteLock)
out/target/common/obj/PACKAGING/public_api.txt:53074: error 4: Added
public constructor java.util.jar.Attributes.Name.Name(String)
out/target/common/obj/PACKAGING/public_api.txt:54404: error 4: Added
public constructor
javax.crypto.spec.PSource.PSpecified.PSpecified(byte)

******************************
You have tried to change the API from what has been previously approved.

To make these errors go away, you have two choices:
   1) You can add "@hide" javadoc comments to the methods, etc. listed in 
the
      errors above.

   2) You can update current.txt by executing the following command:
         make update-api

      To submit the revised current.txt to the main Android repository,
      you will need approval.
******************************




make: *** [out/target/common/obj/PACKAGING/checkpublicapi-current-timestamp]
Error 38


What is strange is that before I build the source code successfully,
and flash the 6.0.1 rom into Nexus 5 successfully

I searched in stackoverflow, but the following solution does not work.

https://stackoverflow.com/questions/30998666/api-change-error-when-building-aosp-5-1
https://stackoverflow.com/questions/14622020/couldnt-parse-api-file-frameworks-base-api-current-txt



The purpose that I want to rebuild the source code is I want to view
the Android Sources in my IDE
https://www.protechtraining.com/blog/post/860
https://shuhaowu.com/blog/setting_up_intellij_with_aosp_development.html

Here is the reproduction steps:

$ source build/envsetup.sh
$ lunch
$ 19
$ make


Someone says that I should `make update-api`. But I did not do any
modification or add any new api.

And plus, when I `make update-api`, I encountered the issue like
https://stackoverflow.com/questions/30998666/api-change-error-when-building-aosp-5-1


frameworks/support/v4/java/android/support/v4/media/TransportMediator.java:190:
error: cannot access RemoteControlClient
        return mController != null ?
mController.getRemoteControlClient() : null;
                                                ^
  class file for android.media.RemoteControlClient not found
frameworks/support/v4/java/android/support/v4/media/TransportMediator.java:240:
error: cannot access OnPlaybackPositionUpdateListener
            mController.refreshState(mCallbacks.onIsPlaying(),
                       ^
  class file for
android.media.RemoteControlClient$OnPlaybackPositionUpdateListener not
found
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 errors
make: *** 
[out/target/common/obj/JAVA_LIBRARIES/android-support-v4_intermediates/classes-full-debug.jar]
Error 41

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to