开发者

Android Start New View Error: missing instrumentation.class

开发者 https://www.devze.com 2023-03-07 01:08 出处:网络
hey, i have new activity that extends Activity and when i\'m trying to change to her i\'m getting the following error:

hey, i have new activity that extends Activity and when i'm trying to change to her i'm getting the following error: "the source attachment doe开发者_JAVA技巧s not contain the source for the file instrumentation.class"

any ideas?


Apparently, this behavior is "normal". I found an answer to this question from a different forum.

That's normal. The SDK doesn't include source code for Android classes. If you step into an Android class while debugging, you'll get the "source not found" message. Do Run -> Step Return to finish executing the method without source code.

However, when I try to Step Over or Step Return, I still receive this error and the program stops. So, I guess it's an answer, but not a solution. I don't know how to get passed this issue.

Here's a link to the original forum post

Update: Using this link View Android Source Code in Eclipse, I found the solution I needed. Find the post by Volure in the comments section. It has a link to a packaged set of Android base code needed to overcome this issue. Put the zip file in the corresponding directory. Then in the Package Explorer, r-click on the jar file, select Properties. In the Java Source Attachment dialog, select External File. Select the zip file. Press OK. Again, r-click the jar file in Package Explorer and select refresh. Test the setup by double-clicking any of the Android classes. You should now see the source.

Hope this saves someone some time. It took me 4 hours of research to discover the solution.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号