A method for producing a compound or a salt thereof represented by a formula (I), comprising reacting a compound or a salt thereof represented by a formula (II) and an aniline derivative represented by a formula (III) in water or a mixed solvent of water and an organic solvent in the presence of 1-ethyl-3-(3-dimethylaminopropyl)carbodiimide and substantially in the absence of a base is disclosed,wherein R1 is a 4-[3-(dimethylamino)azetidin-1-yl]piperidin-1-yl group, a 4-(4-methylpiperazin-1-yl)piperidin-1-yl group, a 3-hydroxyazetidin-1-yl group or a methyl(1-methylpiperidin-4-yl)amino group, R2, R3, R4 and R5 may be the same or different and are each a hydrogen atom or a fluorine atom, and R6 is a hydrogen atom or a halogen atom.