  AAssociation of GW170817/GRB170817A/AT2017gfo provides the first direct
evidence for neutron star mergers as significant sources of $r$-process
nucleosynthesis. A gamma-ray transient (GRT) would be powered by the
radioactive decay of the freshly-synthesized $r$-process elements. By analyzing
the composition and gamma-ray opacity of the kilonova ejecta in details, we
calculate the lightcurve and spectrum of the GRT for a range of spherically
symmetric merger ejecta models with mass $M_{\rm ej}=0.001 \sim 0.05M_{\odot}$
and expansion velocity $v_{\rm ej}= 0.1\sim 0.4c$. It is found that the peak of
the GRT lightcurve depends on $M_{\rm ej}$ and $v_{\rm ej}$ as $t_{\rm pk}
\approx 0.5~{\rm days} ~ (M_{\rm ej}/0.01M_{\odot})^{1/2}(v_{\rm
ej}/0.1c)^{-1}$ and $L_{\rm pk} \approx 2.0\times10^{41} ~{\rm erg~s} ^{-1}
(M_{\rm ej}/0.01M_{\odot})^{1/2}(v_{\rm ej}/0.1c)$. Most radiating photons are
in the $100-3000$ keV band and the spectrum peaks at about 800~keV for
different nuclear physics inputs. The line features are blurred out by the
Doppler broadening effect. Adopting the ejecta parameters reported in
literature, we examine the detection probability of the possible GRT associated
with AT2017gfo. We show that the GRT cannot be convincingly detected neither
with current nor with the proposed missions in the MeV band, such as ETCC and
AMEGO. The low gamma-ray flux, together with the extremely low event rate at
local universe, makes a discovery of GRTs a great challenge.
