今天用eclipse测试apk文件,创建测试工程时,没有选择an existing android project,直接选this project。创建工程后eclipse总是报错:java.lang.NullPointerException
workspace.metadata下的.log文件记录日志:
!ENTRY com.android.ide.eclipse.adt 4 0 2013-11-07 17:01:21.400 !MESSAGE Failed to load properties file for project 'testMMQ'
!ENTRY org.eclipse.core.resources 4 2 2013-11-07 17:01:21.401 !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.resources". !STACK 0 java.lang.NullPointerException
用了网上的很多方法,有的说删除.metadata重启eclipse,不见效。
于是尝试,先创建有源码的工程com.example.android.notepad 和测试工程com.example.android.notepad.test,成功。
再创建无源码的android test project,成功了
但是默认的src和gen下生成了包com.example.android.notepad.test