Invocation failed Unexpected end of file from server java.lang.RuntimeException: Invocation failed U

在AndroidStudio中遇到Git错误'Invocation failed Unexpected end of file from server',通常是由于Git认证问题导致。解决方法是在设置中启用Use credential helper,这将帮助管理Git的凭证存储,从而解决连接中断的问题。

AndroidStudio 使用Git时报错:

Invocation failed Unexpected end of file from server java.lang.RuntimeException: Invocation
 failed Unexpected end of file from server at 
org.jetbrains.git4idea.http.GitAskPassXmlRpcClient.askUsername(GitAskPassXmlRpcClient.java:
54) at org.jetbrains.git4idea.http.GitAskPassApp.main(GitAskPassApp.java:65) Caused by:
 java.net.SocketException: Unexpected end of file from server at 
sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:851) at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:678) at 
sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:848) at 
sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:678) at 
sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1587) at
 sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492) at
 org.apache.xmlrpc.DefaultXmlRpcTransport.sendXmlRpc(DefaultXmlRpcTransport.java:87) at 
org.apache.xmlrpc.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:72) at 
org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:194) at 
org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:185) at 
org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:178) at 

解决办法:

AndroidStudio -> File -> Settings -> Git -> 勾选Use credential helper

10-30 15:00:36.534605 13871 13871 E AndroidRuntime: FATAL EXCEPTION: main 10-30 15:00:36.534605 13871 13871 E AndroidRuntime: Process: com.oplus.autotest.filereplace, PID: 13871 10-30 15:00:36.534605 13871 13871 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.oplus.autotest.filereplace/com.oplus.autotest.filereplace.MainActivity}: java.lang.reflect.InvocationTargetException 10-30 15:00:36.534605 13871 13871 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4372) 10-30 15:00:36.534605 13871 13871 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4569) 10-30 15:00:36.534605 13871 13871 E AndroidRuntime: at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:126) 10-30 15:00:36.534605 13871 13871 E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.executeNonLifecycleItem(TransactionExecutor.java:179) 10-30 15:00:36.534605 13871 13871 E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.executeTransactionItems(TransactionExecutor.java:114) 10-30 15:00:36.534605 13871 13871 E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:86) 10-30 15:00:36.534605 13871 13871 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2902) 10-30 15:00:36.534605 13871 13871 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:107) 10-30 15:00:36.534605 13871 13871 E AndroidRuntime: at android.os.Looper.loopOnce(Looper.java:282) 10-30 15:00:36.534605 13871 13871 E AndroidRuntime: at android.os.Looper.loop(Looper.java:387) 10-30 15:00:36.534605 13871 13871 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:9500) 10-30 15:00:36.534605 13871 13871 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 10-30 15:00:36.534605 13871 13871 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:600) 10-30 15:00:36.534605 13871 13871 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1005) 10-30 15:00:36.534605 13871 13871 E AndroidRuntime: Caused by: java.lang.reflect.InvocationTargetException 10-30 15:00:36.534605 13871 13871 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 10-30 15:00:36.534605 13871 13871 E AndroidRuntime: at com.oplus.autotest.filereplace.KitKt.getCplc(Kit.kt:17) 10-30 15:00:36.534605 13871 13871 E AndroidRuntime: at com.oplus.autotest.filereplace.MainActivity.onCreate(MainActivity.kt:117) 10-30 15:00:36.534605 13871 13871 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:9196) 10-30 15:00:36.534605 13871 13871 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:9168) 10-30 15:00:36.534605 13871 13871 E AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1544) 10-30 15:00:36.534605 13871 13871 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4346) 10-30 15:00:36.534605 13871 13871 E AndroidRuntime: ... 13 more 10-30 15:00:36.534605 13871 13871 E AndroidRuntime: Caused by: java.lang.UnsupportedOperationException 10-30 15:00:36.534605 13871 13871 E AndroidRuntime: at com.vendor.nfc.VendorNfcAdapter.getVendorNfcAdapter(VendorNfcAdapter.java:79) 10-30 15:00:36.534605 13871 13871 E AndroidRuntime: ... 20 more
最新发布
10-31
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

唐诺

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值