我有一台运行Android 4.4.2的Samsung Galaxy S5设备,运行正常,直到几周后才开始出现此问题,在按运行并构建Gradle之后,Android Studio无法安装该应用程序
附加信息:我尝试在emulatir上首次运行该应用程序,并且做了一些更改之后,我尝试再次在模拟器上运行,但是更改没有被应用
这是gradle文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.incorp.anisvikernes.appex"
minSdkVersion 19
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.android.support:cardview-v7:23.1.0'
}
这是LogCat:
03:49:45 Executing tasks: [clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:prepareDebugUnitTestDependencies, :app:mockableAndroidJar, :app:compileDebugSources, :app:compileDebugAndroidTestSources, :app:compileDebugUnitTestSources]
03:51:04 Gradle build finished in 1m 18s 412ms
05:23:54 Executing tasks: [:app:assembleDebug]
05:28:19 Gradle build finished in 4m 25s 153ms
05:28:32 Error during Sync: An existing connection was forcibly closed by the remote host
05:28:32 Session 'app': Error Installing APK
这是错误
08/20 05:28:26: Launching app
$ adb push D:\projects\appex\app\build\outputs\apk\app-debug.apk /data/local/tmp/com.incorp.anisvikernes.appex
java.io.IOException: An existing connection was forcibly closed by the remote host
Error while Installing APK
我实际上找到了解决此问题的解决方案,这看起来确实很奇怪,但是在更新驱动程序后(Win键+ x->设备管理器->转到我的设备并按下更新按钮),我更改了用于连接的USB电缆将手机连接到我的电脑,即可立即使用
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句