Mobile applications are becoming increasingly ubiquitous and provide ever richer functionality on mobile devices, while such applications drain increasingly more battery power of mobile devices. Offloading some parts of the application running on mobile devices onto remote servers/clouds is a promising approach to extend the battery life of mobile devices. However, as data transmission of offloading causes delay and energy costs for mobile devices, it is necessary to carefully design application partitioning/offloading schemes to weigh the benefits against the transmission delay and costs. Due to bandwidth fluctuations in the wireless environment, static partitionings in previous work are unsuitable for mobile platforms with a fixed bandwidth assumption, while dynamic partitionings result in high overhead of continuous partitioning for mobile devices. Therefore, we propose a novel partitioning scheme taking the bandwidth as a variable to improve static partitioning and avoid high costs of dynamic partitioning. Firstly, we construct application Object Relation Graphs (ORGs) by combining static analysis and dynamic profiling to propose partitioning optimization models. Then based on our novel execution-time and energy optimization partitioning models, we propose the Branch-and-Bound based Application Partitioning (BBAP) algorithm and Min-Cut based Greedy Application Partitioning (MCGAP) algorithm. BBAP is suited to finding the optimal partitioning solutions for small applications, while MCGAP is applicable to quickly obtaining suboptimal solutions for large-scale applications. Experimental results demonstrate that both algorithms can adapt to bandwidth fluctuations well, and significantly reduce application execution time and energy consumption by optimally distributing components between mobile devices and servers.