Activity.class - 类文件编辑:JAR文件C:\\ SDK \\ \\平台Android的17 \\的android.jar没有源代码连接 [英] Activity.class - Class File Editor: The JAR file c:\sdk\platforms\android-17\android.jar has no source attachment

查看:295
本文介绍了Activity.class - 类文件编辑:JAR文件C:\\ SDK \\ \\平台Android的17 \\的android.jar没有源代码连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

出于某种原因,一个新的标签在我的调试器打开名为: Activity.class 头说明类文件编辑器 错误提示的JAR文件C:\\ SDK \\平台\\ Android的17 \\的android.jar没有源代码连接。您可以通过点击下面附上源附加来源。

从那里,我想从我的工作区中添加它但它仍然无法正常工作(它只是说变化附带的源现在不是)

logcat的:

  14 09-10:52:25.744:我/的System.out(23760):发送WAIT块
09-10 14:50:58.191:D / dalvikvm(23118):晚启用CheckJNI
09-10 14:50:58.291:E /跟踪(23118):错误打开跟踪文件:没有这样的文件或目录(2)
09-10 14:50:58.311:我/的System.out(23118):发送WAIT块
09-10 14:50:58.311:W / ActivityThread(23118):应用com.example.test正在等待调试器端口8100 ...
09-10 14:50:58.331:I / dalvikvm(23118):调试器是活跃
09-10 14:50:58.511:我/的System.out(23118):调试器连接
09-10 14:50:58.521:我/的System.out(23118):等待调试器来解决...
09-10 14:50:58.721:我/的System.out(23118):等待调试器来解决...
09-10 14:50:58.922:我/的System.out(23118):等待调试器来解决...
09-10 14:50:59.122:我/的System.out(23118):等待调试器来解决...
09-10 14:50:59.322:我/的System.out(23118):等待调试器来解决...
09-10 14:50:59.522:我/的System.out(23118):等待调试器来解决...
09-10 14:50:59.722:我/的System.out(23118):等待调试器来解决...
09-10 14:50:59.923:我/的System.out(23118):调试先后落户(1375)
09-10 14:51:01.244:D / dalvikvm(23118):主题ID = 1:撤消后仍然暂停(SC = 1 DC = 1)
09-10 14:51:46.202:D / dalvikvm(23118):调试器脱落;对象注册了188项
09-10 14:51:46.202:I / dalvikvm(23118):螺纹= 1忽略registerObject要求
09-10 14:51:46.202:I / dalvikvm(23118):螺纹= 1忽略registerObject要求
09-10 14:51:46.352:D / libEGL(23118):加载/system/lib/egl/libEGL_adreno200.so
09-10 14:51:46.352:D / libEGL(23118):加载/system/lib/egl/libGLESv1_CM_adreno200.so
09-10 14:51:46.352:D / libEGL(23118):加载/system/lib/egl/libGLESv2_adreno200.so
09-10 14:51:46.352:I / Adreno200的东瀛(23118):其中,qeglDrvAPI_eglInitialize:294计算值:1.4 EGL构建QUALCOMM:AU_LINUX_ANDROID_JB.04.01.01.00.036_msm8960_JB_CL2644550_release_AU(CL2644550)
09-10 14:51:46.352:I / Adreno200的东瀛(23118):生成日期:12年7月31日星期二
09-10 14:51:46.352:I / Adreno200的东瀛(23118):本地分公司:
09-10 14:51:46.352:I / Adreno200的东瀛(23118):远程分支:QUIC /主
09-10 14:51:46.352:I / Adreno200的东瀛(23118):本地修补程序:否
09-10 14:51:46.352:I / Adreno200的东瀛(23118):重建分公司:AU_LINUX_ANDROID_JB.04.01.01.00.036 + NOTHING
09-10 14:51:46.382:D / OpenGLRenderer(23118):启用调试模式0
09-10 14:52:25.704:E /跟踪(23760):错误打开跟踪文件:没有这样的文件或目录(2)
09-10 14:52:25.724:W / ActivityThread(23760):应用com.example.test正在等待调试器端口8100 ...
09-10 14:52:25.884:I / dalvikvm(23760):调试器是活跃
09-10 14:52:25.944:我/的System.out(23760):调试器连接
09-10 14:52:25.944:我/的System.out(23760):等待调试器来解决...
09-10 14:52:26.145:我/的System.out(23760):等待调试器来解决...
09-10 14:52:26.345:我/的System.out(23760):等待调试器来解决...
09-10 14:52:26.545:我/的System.out(23760):等待调试器来解决...
09-10 14:52:26.745:我/的System.out(23760):等待调试器来解决...
09-10 14:52:26.945:我/的System.out(23760):等待调试器来解决...
09-10 14:52:27.156:我/的System.out(23760):等待调试器来解决...
09-10 14:52:27.356:我/的System.out(23760):等待调试器来解决...
09-10 14:52:27.556:我/的System.out(23760):等待调试器来解决...
09-10 14:52:27.756:我/的System.out(23760):等待调试器来解决...
09-10 14:52:27.957:​​我/的System.out(23760):等待调试器来解决...
09-10 14:52:28.157:我/的System.out(23760):等待调试器来解决...
09-10 14:52:28.357:我/的System.out(23760):调试先后落户(1495)
09-10 14:52:28.617:D / dalvikvm(23760):主题ID = 1:撤消后仍然暂停(SC = 1 DC = 1)
09-10 15:14:09.756:E /跟踪(27219):错误打开跟踪文件:没有这样的文件或目录(2)
09-10 15:14:09.766:我/的System.out(27219):发送WAIT块
09-10 15:14:09.766:W / ActivityThread(27219):应用com.example.test正在等待调试器端口8100 ...
09-10 15:14:09.786:I / dalvikvm(27219):调试器是活跃
09-10 15:14:09.966:我/的System.out(27219):调试器连接
09-10 15:14:09.966:我/的System.out(27219):等待调试器来解决...
09-10 15:14:10.176:我/的System.out(27219):等待调试器来解决...
09-10 15:14:10.376:我/的System.out(27219):等待调试器来解决...
09-10 15:14:10.577:我/的System.out(27219):等待调试器来解决...
09-10 15:14:10.777:我/的System.out(27219):等待调试器来解决...
09-10 15:14:10.977:我/的System.out(27219):等待调试器来解决...
09-10 15:14:11.177:我/的System.out(27219):等待调试器来解决...
09-10 15:14:11.377:我/的System.out(27219):等待调试器来解决...
09-10 15:14:11.578:我/的System.out(27219):等待调试器来解决...
09-10 15:14:11.778:我/的System.out(27219):等待调试器来解决...
09-10 15:14:11.978:我/的System.out(27219):调试先后落户(1496)
09-10 15:14:12.729:D / dalvikvm(27219):主题ID = 1:撤消后仍然暂停(SC = 1 DC = 1)

来源:

 包com.example.test;进口java.io.BufferedReader中;
进口的java.io.InputStream;
进口java.io.InputStreamReader中;
进口java.io.IOException异常;进口org.jsoup.Jsoup;
进口org.jsoup.nodes.Document;
进口org.jsoup.nodes.Element;
进口org.jsoup.select.Elements;
进口org.apache.http.Htt presponse;
进口org.apache.http.client.methods.HttpGet;
进口org.apache.http.impl.client.DefaultHttpClient;进口com.example.test.R;进口android.app.Activity;
进口android.os.AsyncTask;
进口android.os.Bundle;
进口android.view.View;
进口android.widget.TextView;公共类MainActivity延伸活动{
    私人TextView的TextView的;    @覆盖
    公共无效的onCreate(捆绑savedInstanceState){
        super.onCreate(savedInstanceState);
        的setContentView(R.layout.activity_main);
        TextView的=(的TextView)findViewById(R.id.TextView01);
    }    私有类DownloadWebPageTask扩展的AsyncTask<弦乐,太虚,字符串> {
        @覆盖
        保护字符串doInBackground(字符串的URL ...){
            串响应=;
            对于(字符串网址:网址){
                DefaultHttpClient客户端=新DefaultHttpClient();
                HTTPGET HTTPGET =新HTTPGET(URL);
                尝试{
                    文档文档;
                    //需要http协议
                    DOC = Jsoup.connect(http://google.com)获得();                    //获取页面标题
                    字符串title = doc.title();
                    的System.out.println(标题:+题);                    //获取所有链接
                    元素链接= doc.select(一个[HREF]);
                    对于(元素链接:链接){                        //从href属性值
                        的System.out.println(\\ nlink:+ link.attr(的href));
                        的System.out.println(文字:​​+ link.text());                    }                }赶上(IOException异常五){
                    e.printStackTrace();
                }
            }
            返回响应;
        }        @覆盖
        保护无效onPostExecute(字符串结果){
            textView.setText(结果);
        }
    }    公共无效的onClick(查看视图){
        DownloadWebPageTask任务=新DownloadWebPageTask();
        task.execute(新的String [] {http://www.google.com});
    }
}


解决方案

尝试以下

第1步:进入的Adroid-SDK安装folder.Make确保您有一个文件夹的android-17 Android的SDK /来源/

第二步:立即转到类文件编辑器选项卡。在那里你会看到标签按钮'连接源$ C ​​$ C 。点击它,去选择外部文件夹的选项。然后浏览,直到你达到上面提到的android-17文件夹中。选择它。它将附加源$ C ​​$ C。

第三步:立即刷新项目

第四步:现在再次由 CTRL +检查活动来源$ C ​​$ C点击

就是这样,现在你可以看到源$ C ​​$ C为活动

更新:

附加Android源

For some reason a new tab opens in my debugger titled: Activity.class with a header stating: Class File Editor and the error stating: The JAR file c:\sdk\platforms\android-17\android.jar has no source attachment. You can attach a source by clicking attach source below.

From there I tried adding it from my workspace however it still does not work (it simply says change attached source now instead)

LOGCAT:

09-10 14:52:25.744: I/System.out(23760): Sending WAIT chunk
09-10 14:50:58.191: D/dalvikvm(23118): Late-enabling CheckJNI
09-10 14:50:58.291: E/Trace(23118): error opening trace file: No such file or directory (2)
09-10 14:50:58.311: I/System.out(23118): Sending WAIT chunk
09-10 14:50:58.311: W/ActivityThread(23118): Application com.example.test is waiting for the debugger on port 8100...
09-10 14:50:58.331: I/dalvikvm(23118): Debugger is active
09-10 14:50:58.511: I/System.out(23118): Debugger has connected
09-10 14:50:58.521: I/System.out(23118): waiting for debugger to settle...
09-10 14:50:58.721: I/System.out(23118): waiting for debugger to settle...
09-10 14:50:58.922: I/System.out(23118): waiting for debugger to settle...
09-10 14:50:59.122: I/System.out(23118): waiting for debugger to settle...
09-10 14:50:59.322: I/System.out(23118): waiting for debugger to settle...
09-10 14:50:59.522: I/System.out(23118): waiting for debugger to settle...
09-10 14:50:59.722: I/System.out(23118): waiting for debugger to settle...
09-10 14:50:59.923: I/System.out(23118): debugger has settled (1375)
09-10 14:51:01.244: D/dalvikvm(23118): threadid=1: still suspended after undo (sc=1 dc=1)
09-10 14:51:46.202: D/dalvikvm(23118): Debugger has detached; object registry had 188 entries
09-10 14:51:46.202: I/dalvikvm(23118): ignoring registerObject request in thread=1
09-10 14:51:46.202: I/dalvikvm(23118): ignoring registerObject request in thread=1
09-10 14:51:46.352: D/libEGL(23118): loaded /system/lib/egl/libEGL_adreno200.so
09-10 14:51:46.352: D/libEGL(23118): loaded /system/lib/egl/libGLESv1_CM_adreno200.so
09-10 14:51:46.352: D/libEGL(23118): loaded /system/lib/egl/libGLESv2_adreno200.so
09-10 14:51:46.352: I/Adreno200-EGL(23118): <qeglDrvAPI_eglInitialize:294>: EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_JB.04.01.01.00.036_msm8960_JB_CL2644550_release_AU (CL2644550)
09-10 14:51:46.352: I/Adreno200-EGL(23118): Build Date: 07/31/12 Tue
09-10 14:51:46.352: I/Adreno200-EGL(23118): Local Branch: 
09-10 14:51:46.352: I/Adreno200-EGL(23118): Remote Branch: quic/master
09-10 14:51:46.352: I/Adreno200-EGL(23118): Local Patches: NONE
09-10 14:51:46.352: I/Adreno200-EGL(23118): Reconstruct Branch: AU_LINUX_ANDROID_JB.04.01.01.00.036 +  NOTHING
09-10 14:51:46.382: D/OpenGLRenderer(23118): Enabling debug mode 0
09-10 14:52:25.704: E/Trace(23760): error opening trace file: No such file or directory (2)
09-10 14:52:25.724: W/ActivityThread(23760): Application com.example.test is waiting for the debugger on port 8100...
09-10 14:52:25.884: I/dalvikvm(23760): Debugger is active
09-10 14:52:25.944: I/System.out(23760): Debugger has connected
09-10 14:52:25.944: I/System.out(23760): waiting for debugger to settle...
09-10 14:52:26.145: I/System.out(23760): waiting for debugger to settle...
09-10 14:52:26.345: I/System.out(23760): waiting for debugger to settle...
09-10 14:52:26.545: I/System.out(23760): waiting for debugger to settle...
09-10 14:52:26.745: I/System.out(23760): waiting for debugger to settle...
09-10 14:52:26.945: I/System.out(23760): waiting for debugger to settle...
09-10 14:52:27.156: I/System.out(23760): waiting for debugger to settle...
09-10 14:52:27.356: I/System.out(23760): waiting for debugger to settle...
09-10 14:52:27.556: I/System.out(23760): waiting for debugger to settle...
09-10 14:52:27.756: I/System.out(23760): waiting for debugger to settle...
09-10 14:52:27.957: I/System.out(23760): waiting for debugger to settle...
09-10 14:52:28.157: I/System.out(23760): waiting for debugger to settle...
09-10 14:52:28.357: I/System.out(23760): debugger has settled (1495)
09-10 14:52:28.617: D/dalvikvm(23760): threadid=1: still suspended after undo (sc=1 dc=1)
09-10 15:14:09.756: E/Trace(27219): error opening trace file: No such file or directory (2)
09-10 15:14:09.766: I/System.out(27219): Sending WAIT chunk
09-10 15:14:09.766: W/ActivityThread(27219): Application com.example.test is waiting for the debugger on port 8100...
09-10 15:14:09.786: I/dalvikvm(27219): Debugger is active
09-10 15:14:09.966: I/System.out(27219): Debugger has connected
09-10 15:14:09.966: I/System.out(27219): waiting for debugger to settle...
09-10 15:14:10.176: I/System.out(27219): waiting for debugger to settle...
09-10 15:14:10.376: I/System.out(27219): waiting for debugger to settle...
09-10 15:14:10.577: I/System.out(27219): waiting for debugger to settle...
09-10 15:14:10.777: I/System.out(27219): waiting for debugger to settle...
09-10 15:14:10.977: I/System.out(27219): waiting for debugger to settle...
09-10 15:14:11.177: I/System.out(27219): waiting for debugger to settle...
09-10 15:14:11.377: I/System.out(27219): waiting for debugger to settle...
09-10 15:14:11.578: I/System.out(27219): waiting for debugger to settle...
09-10 15:14:11.778: I/System.out(27219): waiting for debugger to settle...
09-10 15:14:11.978: I/System.out(27219): debugger has settled (1496)
09-10 15:14:12.729: D/dalvikvm(27219): threadid=1: still suspended after undo (sc=1 dc=1)

SOURCE:

package com.example.test;

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.IOException;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;

import com.example.test.R;

import android.app.Activity;
import android.os.AsyncTask;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

public class MainActivity extends Activity {
    private TextView textView;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        textView = (TextView) findViewById(R.id.TextView01);
    }

    private class DownloadWebPageTask extends AsyncTask<String, Void, String> {
        @Override
        protected String doInBackground(String... urls) {
            String response = "";
            for (String url : urls) {
                DefaultHttpClient client = new DefaultHttpClient();
                HttpGet httpGet = new HttpGet(url);
                try {
                    Document doc;
                    // need http protocol
                    doc = Jsoup.connect("http://google.com").get();

                    // get page title
                    String title = doc.title();
                    System.out.println("title : " + title);

                    // get all links
                    Elements links = doc.select("a[href]");
                    for (Element link : links) {

                        // get the value from href attribute
                        System.out.println("\nlink : " + link.attr("href"));
                        System.out.println("text : " + link.text());

                    }

                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return response;
        }

        @Override
        protected void onPostExecute(String result) {
            textView.setText(result);
        }
    }

    public void onClick(View view) {
        DownloadWebPageTask task = new DownloadWebPageTask();
        task.execute(new String[] { "http://www.google.com" });
    }
}

解决方案

Try following

Step 1 : Go to the adroid-sdk install folder.Make sure you have a folder android-17, at android-sdk/sources/

Step 2 : Now go to Class File Editor tab. There you will see a button with label 'Attach source code'. Click it and get the option to select an external folder. And browse till you reach above mentioned android-17 folder. Select it. It will attach the source code.

Step 3 : Now refresh the project.

Step 4 : Now again check the source code of Activity by ctrl+click.

That's it, now you can see the source code for Activity.

UPDATE:

Refer attach android source

这篇关于Activity.class - 类文件编辑:JAR文件C:\\ SDK \\ \\平台Android的17 \\的android.jar没有源代码连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆