android编程常见问题- Resource ID #0x7f070001 type #0x12 is not valid
问题说明:
AndroidRuntime(1705): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.activitytest/com.example.activitytest.SecondActivity}: android.content.res.Resources$NotFoundException: Resource ID #0x7f070001 type #0x12 is not valid
解决办法:
根据Resource ID #0x7f070001 type #0x12 is not valid 提示,去R.java 文件中检查是否定义该对象,

如果已经定义,则检查com.example.activitytest.SecondActivity类
  
发现语句写错了,改为:setContentView(R.layout.second_layout);解决问题
    不断的总结,才能不断的提高;不断的思考,才能不断的进步!
                    
                
                
            
        
浙公网安备 33010602011771号