HttpURLConnection不起作用

时间:2017-04-29 07:40:28

标签: android android-studio httpurlconnection

已建立Internet连接但不建立URLconnection.URL也是正确的。当我在Web浏览器中访问URL时它会发送数据。请有人告诉我这是什么问题?以及如何解决它?

我的代码::

2014.0120.2000.08 ((SQL14_RTM).140220-1924 )

输出流程::

*******************************************************************************
*                                                                             *
*                        Exception Analysis                                   *
*                                                                             *
*******************************************************************************


DUMP_CLASS: 2

DUMP_QUALIFIER: 400

CONTEXT:  (.ecxr)
rax=0000000000000000 rbx=0000000072f3df90 rcx=000000000000000a
rdx=0000000072f3df90 rsi=0000000000000000 rdi=0000000080000010
rip=00007ffcb524a030 rsp=000000000f13ec18 rbp=000000001339d408
 r8=000000000f13eb78  r9=000000001339d408 r10=0000000000000000
r11=000000000f13ebe0 r12=0000000000220a5e r13=0000000000000090
r14=0000000000000000 r15=0000000000000000
iopl=0         nv up ei pl zr na po nc
cs=0033  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000246
ntdll!RtlFailFast2:
00007ffc`b524a030 cd29            int     29h
Resetting default scope

FAULTING_IP: 
ntdll!RtlFailFast2+0
00007ffc`b524a030 cd29            int     29h

EXCEPTION_RECORD:  (.exr -1)
ExceptionAddress: 00007ffcb524a030 (ntdll!RtlFailFast2)
   ExceptionCode: c0000409 (Security check failure or stack buffer overrun)
  ExceptionFlags: 00000001
NumberParameters: 1
   Parameter[0]: 000000000000000a
Subcode: 0xa FAST_FAIL_GUARD_ICALL_CHECK_FAILURE

PROBLEM_CLASSES: 

    ID:     [0n262]
    Type:   [FAIL_FAST]
    Class:  Primary
    Scope:  DEFAULT_BUCKET_ID (Failure Bucket ID prefix)
            BUCKET_ID
    Name:   Add
    Data:   Omit
    PID:    [Unspecified]
    TID:    [Unspecified]
    Frame:  [0]

    ID:     [0n256]
    Type:   [GUARD_ICALL_CHECK_FAILURE]
    Class:  Addendum
    Scope:  DEFAULT_BUCKET_ID (Failure Bucket ID prefix)
            BUCKET_ID
    Name:   Add
    Data:   Omit
    PID:    [Unspecified]
    TID:    [Unspecified]
    Frame:  [0]

    ID:     [0n92]
    Type:   [AVRF]
    Class:  Addendum
    Scope:  DEFAULT_BUCKET_ID (Failure Bucket ID prefix)
            BUCKET_ID
    Name:   Add
    Data:   Omit
    PID:    [0x3be8]
    TID:    [0x3cf0]
    Frame:  [0] : ntdll!RtlFailFast2

BUGCHECK_STR:  FAIL_FAST_GUARD_ICALL_CHECK_FAILURE_AVRF

DEFAULT_BUCKET_ID:  FAIL_FAST_GUARD_ICALL_CHECK_FAILURE_AVRF

PRIMARY_PROBLEM_CLASS:  FAIL_FAST

STACK_TEXT:  
00 ntdll!RtlFailFast2
01 ntdll!RtlpHandleInvalidUserCallTarget
02 ntdll!LdrpHandleInvalidUserCallTarget
03 user32!UserCallWinProcCheckWow
04 user32!DispatchClientMessage
05 user32!_fnDWORD
06 ntdll!KiUserCallbackDispatcherContinue
07 win32u!NtUserDestroyWindow
08 SqlManager_72c70000!CEventRegWnd::~CEventRegWnd
09 SqlManager_72c70000!CRT_INIT
0a SqlManager_72c70000!CRT_INIT
0b verifier!AVrfpStandardDllEntryPointRoutine
0c ntdll!LdrpCallInitRoutine
0d ntdll!LdrpProcessDetachNode
0e ntdll!LdrpUnloadNode
0f ntdll!LdrpDecrementModuleLoadCountEx
10 ntdll!LdrUnloadDll
11 KERNELBASE!FreeLibrary
12 combase!CClassCache::CDllPathEntry::CFinishObject::Finish
13 combase!CClassCache::CFinishComposite::Finish
14 combase!CClassCache::CleanUpDllsForApartment
15 combase!CCCleanUpDllsForApartment
16 combase!FinishShutdown::__l2::<lambda_ac39365968346bea08de70a73a47183a>::operator()
17 combase!ObjectMethodExceptionHandlingAction<<lambda_ac39365968346bea08de70a73a47183a> >
18 combase!FinishShutdown
19 combase!ApartmentUninitialize
1a combase!wCoUninitialize
1b combase!CoUninitialize
1c verifier!AVrfpCoUninitialize
1d mmcndmgr!MMC21ADDREMOVEUI::CAboutInfoThread::ThreadProc
1e msvcrt!_callthreadstartex
1f msvcrt!_threadstartex
20 verifier!AVrfpStandardThreadFunction
21 kernel32!BaseThreadInitThunk
22 ntdll!RtlUserThreadStart

2 个答案:

答案 0 :(得分:0)

 ....execute("jsonparsingdemo-cec5b......

你忘记了协议:

 ....execute("http://jsonparsingdemo-cec5b......

答案 1 :(得分:0)

您的网址问题,

   URL url = new URL(params[0]);

将其设为字符串

url = new URL(urlString.toString());

希望它能起作用。