Abstract-In the received signal strength (RSS) based indoor wireless localization system, RSS measurements are very susceptible to the complex structures and dynamic nature of indoor environments, which will result in the system failure to achieve a high location accuracy. In this paper, we investigate the indoor positioning problem in the existence of RSS variations without prior knowledge about the localization area and without time-consuming off-line surveys. An adaptive sparsity-based localization algorithm is proposed to mitigate the effects of RSS variations. The novel feature of this method is to adjust both the overcomplete basis (a.k.a. dictionary) and the sparse solution using a dictionary learning (DL) technology based on the quadratic programming approach so that the location solution can better match the actual RSS scenario. Moreover, we extend this algorithm to deal with the problem of positioning targets from multiple categories, a novel problem that few works have ever concerned before. Simulation results demonstrate the superiority of the proposed algorithm over some state-of-art environmental-adaptive indoor localization methods.