Rapid technological advances have accelerated offshore and onshore tight oil extraction to meet growing energy demand. Reliable tools to carry out production prediction are essential for development of unconventional reservoirs. The existed tri-linear analytical solutions are verified to be versatile enough to capture fundamental flow mechanisms and make accurate production predictions. However, these solutions are obtained in Laplace space with the Laplace transform and numerical inversion, which may lead to uncertainty in the solution. In this paper, a general analytical solution is derived in real-time space through integral transform and average pressure substitution. Namely, the partial differential equations describing subsurface fluid flow are firstly triple-integrated and then the obtained volume average pressure are replaced with the rate-dependent expressions. Furthermore, the ordinary differential equations related to oil rate are solved analytically in real-time space. To validate our model, this derived solution is verified against two numerical models constructed with two typical physical configurations. The great match indicates the accuracy and applicability of the analytical solution. According to the developed workflow, two field cases including offshore and onshore tight oilfield data are selected for history matching and production prediction. This new approach not only makes the obtained solution more simplified, but also helps field engineers diagnose flow patterns more quickly to better optimize production schemes.