简体   繁体   中英

User user = userService.getCurrentUser(); throws a NullPointerException

Why does this User user = userService.getCurrentUser(); throws a NullPointerException? Any idea?

Being logged into other Google services doesn't guarantee that you'll be logged into the App Engine app. Users need to individually log into your application with their Google Account. You'll need to call createLoginUrl. Take a look at the docs here:

Check this link for google description

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM