LVL Library Google Play licensing response code always NOT LICENSED for test accounts

妖精的绣舞 提交于 2019-12-08 02:03:59

问题


I've added licensing to my android application using LVL Library. Licensing works properly for normal users which buys it in Google Play (I think so - I don't have any feedback about problems). It worked also when I primarily tested it on second device with some test account.

Currently I have problem that server always return NOT_LICENSED response code (1) on devices with test account whatever I set in "license test answer" in developer console. When I test on device with publisher account answer is correct (server returns what I set in "license test answer").

I've tested on signed release build and on debug build and always the same. I've the same release build uploaded to Google Play (and use the same versionCode for debug version as this which was uploaded). I've tested with single (primary??) test account configured on test device.

Interesting thing - to device with primary test account I've added publisher account (settings/accounts and synch/add account), and answer is still always NOT_LICENSED even if there is publisher account on it. Unfortunatelly I cannot delete test account from that device because I have some data which I don't want to delete.

I gave apk to other testers and added test accounts for them - they have the same issue - always NOT_LICENSED response.


回答1:


i had the same issue for an app that was already published: If you count up your android:versionCode in the Manifest, higher than the currently published version, the play store will always return not_licensed. So the solution is to NOT count up the version code while you are testing. The behaviour is strange but this solution worked for me.



来源:https://stackoverflow.com/questions/11122371/lvl-library-google-play-licensing-response-code-always-not-licensed-for-test-acc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!