简体   繁体   中英

Android putExtra cannot resolve symbol

I'm trying to transfer a string from one activity to another in android. I'm working off of this answer: How to use putExtra() and getExtra() for string data

However, I think I'm doing something really basic incorrectly. When I type " i.putExtra " I get the error "cannot resolve putExtra." Do I need to import something to use putExtra ?

In the documentation for putExtra it seems that I should be able to use it as long as I've imported android.content .Intent, which I have.

您必须将代码放入OnCreate()语句中。

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