Resources in cognitive radio networks (CRNs) should dynamically be allocated according to the sensed radio environment. Although some work has been done for dynamic resource allocation in CRNs, many works assume that the radio environment can perfectly be sensed. However, in practice, it is difficult for the secondary network to have the perfect knowledge of a dynamic radio environment in CRNs. In this paper, we study the dynamic resource allocation problem for heterogeneous services in CRNs with imperfect channel sensing. We formulate the power and channel allocation problem as a mixed-integer programming problem under constraints. The computational complexity is enormous to solve the problem. To reduce the computational complexity, we tackle this problem in two steps. First, we solve the optimal power allocation problem using the Lagrangian dual method under the assumption of known channel allocation. Next, we solve the joint power and channel allocation problem using the discrete stochastic optimization method, which has low computational complexity and fast convergence to approximate to the optimal solution. Another advantage of this method is that it can track the changing radio environment to dynamically allocate the resources. Simulation results are presented to demonstrate the effectiveness of the proposed scheme.