The source attachment does not contain the source for the file Layoutinflater.class

前端 未结 2 860
说谎
说谎 2020-12-04 00:21

I\'m trying to write an android application that uses google maps api version 2.
In Debug the application crashes when it executes the instruction:

              


        
相关标签:
2条回答
  • 2020-12-04 00:58

    This usually means that you are unable to access the source code whose bytecode is being called. In order to list out the exception you would need the original source which unfortunately is usually unavailable in jar formats.

    Your option is to update the .jar file by updating your Android SDK with correct Rev’s and let it compile again to fix the issue.

    0 讨论(0)
  • 2020-12-04 01:04

    This is a common question and I can never find a good answer for anyone so I'll do my best to help.

    This sounds like you are missing the source code for Android. You need to download the Sources for Android SDK in Eclipse with the SDK Manager.

    1. Open the SDK Manager in Eclipse
    2. Find the version of android you want the source for. In this example, Android 4.2 (API17)
    3. Check the box Sources for Android SDK
    4. Click Install # packages

    For example

    enter image description here

    After that, run your program and get to the point that you get that error. Now you will need to attach the documentation you've downloaded

    Short

    1. Click the button Edit Source Lookup Path
    2. Click the Default folder
    3. Click Add
    4. Select File System Directory and click OK
    5. Locate your downloaded source code. In this example, look for android-17 for API17. It will be in a directory such as adt-bundle\sdk\sources\android-17
    6. Click OK a few times and your source is now linked.

    Long

    Click the button Edit Source Lookup Path

    enter image description here

    Click the Default folder and click Add

    enter image description here

    Select File System Directory and click OK

    enter image description here

    Locate your downloaded source code. In this example, look for android-17 for API17. It will be in a directory such as adt-bundle\sdk\sources\android-17

    enter image description here

    Click OK twice and it should look something like this

    enter image description here

    Click OK and enjoy your source code

    0 讨论(0)
提交回复
热议问题