If using Oracle 18c XE Database to install the latest version of apex then
Open cmd and then cd to database home directory\bin
cd D:\app\Administrator\product\18.0.0\dbhomeXE\bin
Now type the following:
sqlplus / as sysdba
If login successful then type the following
create pfile = 'D:\app\Administrator\product\18.0.0\dbhomeXE\admin\init.ora' from spfile
Open file D:\app\Administrator\product\18.0.0\dbhomeXE\admin\init.ora using notepad
Modify value for memory_target=0
Next, type the following
startup pfile = 'D:\app\Administrator\product\18.0.0\dbhomeXE\admin\init.ora'
Once the database is up type the following script
create spfile from pfile='D:\app\Administrator\product\18.0.0\dbhomeXE\admin\init.ora'
Note: You can use any directory to create the pfile e.g c:\init.ora
Finally Shutdown and restart the database again;
To shutdown type (on sqlplus)
shutdown;
To restart type (on sqlplus)
startup;