Apple Music - The code you entered is not valid
An Apple Music Family Membership requires iCloud Family Sharing to be set up.

According to Apple:


  Family Sharing requires a personal Apple ID signed in to iCloud and iTunes. Music, movies, TV shows and books can be downloaded on up to 10 devices per account, five of which can be computers. iOS 8 or later and OS X Yosemite or later are required to set up or join a Family Sharing group, and are recommended for full functionality. Not all content is eligible for Family Sharing. Content can be hidden by family members; hidden content is not available for download. Content downloaded from family members or acquired via redemption codes is not subject to Ask to Buy.
  
  iCloud requires iOS 5 or later on iPhone 3Gs or later, iPod touch (3rd
  generation or later), iPad Pro, iPad Air or later, iPad or later, or
  iPad mini or later; a Mac computer with OS X Lion 10.7.5 or later; or
  a PC with Windows 7 or Windows 8 (Outlook 2007 or later or an
  up-to-date browser is required for accessing email, contacts and
  calendars). Some features require iOS 10 and macOS Sierra. Some
  features require a Wi-Fi connection. Some features are not available
  in all countries. Access to some services is limited to 10 devices.


Since you're saying you're already in the family group, I expect the problem you're having is that you're using an Android device (the above seems to imply you need to be on macOS, iOS or Windows). I would do the following:


Contact Apple to check if there is a way around this conundrum and, if not,
Send feedback to Apple as well as an email to support@apple.com (that's the email address they use for support re their Android apps).


I would think that since Apple offers the Apple Music Android app that this is an unintended consequence of how things are currently set up, so sending feedback is the only way of getting things changed.