FWIW I am able to use Android Studio and ADB bridge to test a debug build with in-app purchases on one device with a second xxxxxxxxx.gmail.com to work around the publisher being blocked from purchasing his own wares.
1) Do everything you need to do to where you install the app from the Play Store (I used TrivialDrive sample in Android Studio) and get the error message "The publisher cannot purchase this item".
2) On my desktop I signed out of my publisher gmail address and then created a new gmail account for testing.
3) On Android device (mine is Lollipop) go to settings:accounts:google and add the gmail acccount you just created as a second account. It will prompt you to add a payment method. You have to do it. Credit card, paypal, something. You need a valid second account for the Play Store that can buy stuff.
4) In developer console make sure to add the new gmail address as a tester in two places; APK section of the specific app and in your account settings under license testing.
5) In developer console in App's APK section copy the tester opt-in URL and mail it to your new gmail address so you can open it from inside the email on the Android device.
6) Go to play store app on Android. Click on the triple bar upper left. Slide out menu near top has the account that will be billed to purchase things. Change it to the new gmail account you added.
7) On Android log in to read new gmail and find waiting for you the opt-in URL you mailed to yourself. Click it and follow it through to get the app installed. Choose Play Store, not a browser, to install from when it gets to there.
8) Now try an in-app purchase. No more publisher can't purchase error. In alpha test it says you won't actually be billed. You may have to wait a while for changes done in developer console to propagate through the system. So if first try at in-app purchase doesn't work wait a half hour and try again.
After that you can rebuild the signed release version in Android Studio and install it via adb bridge. In-app purchase keeps working. You can also build a debug version and that will work for IAP testing too. You must add your keystore info in build.gradle to for the debug version to work.
android {
signingConfigs {
release {
storeFile file("MyAndroidKey.keystore")
storePassword "mypassword"
keyAlias "MyAndroidKey"
keyPassword "mypassword"
}
debug {
storeFile file("MyAndroidKey.keystore")
storePassword "mypassword"
keyAlias "MyAndroidKey"
keyPassword "mypassword"
}
}