In the indoor location based on Wi Fi location fingerprint, the received signal strength indicators (RSSI) collected by heterogeneous devices at the same location and time are different, which makes the offline fingerprint database incompatible with the online signals collected by different users, thus affecting the location accuracy. To solve this problem, this paper proposes a localization algorithm suitable to heterogeneous devices. In this method, the offline fingerprint database with stable signals is constructed through the selection of access point (AP), and then the fingerprint database is standardized by procrustes analysis (PA) to eliminate the signal difference introduced by heterogeneous devices. In the online stage, the cosine similarity (CS) algorithm is used to obtain the position estimation of the target. The positioning performance of the proposed method is tested with four mobile phones in two typical indoor environments, and the factors affecting the positioning performance are analyzed. The experimental results show that the average positioning errors of the proposed method in the two indoor environments are 2.96 m and 2.29 m, which is 21.3% and 21.6% higher than those of the Weight K-nearest neighbor (WKNN) algorithm, respectively.