Incompatible library version: AAA requires version 1.0.0 or later, but BBB provides version 0.0.0

I generated XCframework for framework BBB using swift-create-xcframework Github Action and tried to use it in the main app Xcode project. The main app project contains a framework 'AAA' which requires a BBB framework. Then I got the following runtime error:

dyld: Library not loaded: @rpath/BBB.framework/BBB
  Referenced from: /Users/......
  Reason: Incompatible library version: AAA requires version 1.0.0 or later, but BBB provides version 0.0.0
dyld: launch, loading dependent libraries
.
.
.