I've tracked down the reason for this. The following is taken from the description for the 0.8.0 SDK release:
"Configure network at the transaction and server level rather than using a singleton to determine
which network to use globally."
For server level, we already have this in place:
Server server = new Server("https://horizon.stellar.org");
At the transaction level there is now an additional argument passed, in this case
You can delete
When building your transaction, the followng may help:
publicKeyForSourceAccount is the public key string for the source account, and
publicKeyForDestinationAccount is the public key string for the destination account.
AccountResponse sourceAccount = server.accounts().account(publicKeyForSourceAccount);
org.stellar.sdk.Transaction payment = new org.stellar.sdk.Transaction.Builder(sourceAccount, Network.PUBLIC) //Have to use fully qualified name for Transaction as Firebase already has a Transaction import.
.addOperation(new PaymentOperation.Builder(publicKeyForDestinationAccount, new AssetTypeNative(), amount).build())