An amino pyrimidine compound for inhibiting protein tyrosine kinase activity, a pharmaceutical composition thereof, preparation therefor, and an application hereof. Specifically, an amino pyrimidine compound represented by formula (I), R1, R2, L, Y, R6, W, A, m, and n being defined in the specification, and a pharmaceutically acceptable salt, a stereoisomer, a solvent compound, a hydrate, a polymorphism, a prodrug, or an isotope variant thereof. The compound can be used for treating and/or preventing protein tyrosine kinase-related diseases such as cell proliferative diseases, cancers, and immune diseases.