Hi Alice,
thank you so much for you replay!
But I still have two problem:
1. when I add the code above and try to build the code , I got an Error of 'kPORT_MuxAsGpio' undeclared (first use in this function) and the building stop at :
PORT_SetPinMux(PORTA, 1U, kPORT_MuxAsGpio);
when I try to open the pins icon,

the IDE tell me No processor selected, but on the Project Settings - MCU, the setting is MK22FN512VLH12 already.

2. could you please tell me what is GPIO clock, why I have to Enable it? and what does "PORT_SetPinMux(PORTA, 1U, kPORT_MuxAsGpio);" doing?