We analyze the existence of almost periodic (respectively, almost automorphic, recurrent) solutions of a linear non-homogeneous differential (or difference) equation in a Banach space, with almost periodic (respectively, almost automorphic, recurrent) coefficients. Under some conditions we prove that one of the following alternatives is fulfilled:(i) There exists a complete trajectory of the corresponding homogeneous equation with constant positive norm; (ii) The trivial solution of the homogeneous equation is uniformly asymptotically stable. If the second alternative holds, then the non-homogeneous equation with almost periodic (respectively, almost automorphic, recurrent) coefficients possesses a unique almost periodic (respectively, almost automorphic, recurrent) solution. We investigate this problem within the framework of general linear nonautonomous dynamical systems. We apply our general results also to the cases of functional-differential equations and difference equations.1. Introduction. Let (X, ρ) be a complete metric space, R (Z) be the group of real (integer) numbers. By S we will denote either R or Z and by T a sub-semigroup of S. Let (X, T, π) be a dynamical system on X, i.e., let π : T×X→X be a continuous function such that π(0, x) = x for all x ∈ X, and π(tAn m-dimensional torus is denoted by T m := R m /2πZ. Let (T m , T, σ) be an irrational winding of T m , i.e., σ(t, ν) := (ν 1 t, ν 2 t, . . . , ν m t) for all t ∈ S and ν ∈ T m and the numbers ν 1 , ν 2 , . . . , ν m are rationally independent. A point x ∈ X is called quasi-periodic with frequency ν := (ν 1 , ν 2 , . . . , ν m ) ∈ T m , if there exists a continuous function Φ : T m → X such that π(t, x) := Φ(σ(t, ω)) for 2010 Mathematics Subject Classification. 34G10,