gpt4 book ai didi

Android Studio 不刷新新版本

转载 作者:塔克拉玛干 更新时间:2023-11-01 21:24:56 25 4
gpt4 key购买 nike

使用 ASUS ZenPad10 时,有时我运行一个应用程序,但启动的是旧应用程序。所以我认为已经修复了一些东西,但实际上我正在测试仍然有错误的版本,浪费了很多时间。

其他平板电脑不会发生这种情况。除此之外,我需要禁用 ADB 才能在平板电脑中启动应用程序。使用 Nexus 10,我无需执行任何操作。

在/data/app 目录中还有所有目录(如“myapp/”)而不是 Nexus 10 中的 apks(如“myapp.apk”)。

有什么办法可以避免刷新带来的问题吗?

我想知道“通过 USB 验证应用程序”是否可能是原因,但我无法在 ASUS 上禁用它。

我认为没有必要,但这是我的主要 gradle 文件:

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
maven { url "http://dl.bintray.com/populov/maven" }
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.+'
}
}

allprojects {
repositories {
mavenCentral()
jcenter()
maven {
url 'https://github.com/suckgamony/RapidDecoder/raw/master/repository'
}
}
}

task wrapper(type: Wrapper) {
gradleVersion = '2.5' //version required
}

这是我的应用程序 gradle 文件:

apply plugin: 'com.android.application'

dependencies {
compile fileTree(include: '*.jar', dir: 'libs')
compile project(':Structure:StructureExam')
compile 'com.github.bmelnychuk:atv:1.2.+'
compile 'com.github.johnkil.print:print:1.3.1'
compile 'de.codecrafters.tableview:tableview:0.9.6'
}

android {
compileSdkVersion 23
buildToolsVersion '23.0.1'

signingConfigs {
release {
storeFile file("../../myfile.jks")
storePassword "mypass"
keyAlias "myalias"
keyPassword "mypass"
}
}

buildTypes {
release {
signingConfig signingConfigs.release
}
}

lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for com.centervue.lib_util.errors in release builds,
// but continue the build even when com.centervue.lib_util.errors are found:
abortOnError false
}

sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}

// Move the tests to tests/java, tests/res, etc...
instrumentTest.setRoot('tests')

// Move the build types to build-types/<type>
// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
// This moves them out of them default location under src/<type>/... which would
// conflict with src/ being used by the main source set.
// Adding new build types or product flavors should be accompanied
// by a similar customization.
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
}
}

最佳答案

看起来您已启用即时运行(默认情况下)。该功能导致仅将更改后的代码发送到设备上的应用程序。什么可能会导致你面临的麻烦......

禁用它:[设置/首选项] -> 构建、执行、部署 -> 即时运行:取消选中“启用即时运行以热交换代码......”

或者,您可以使用 clean and Rerun 'app' from Run (^⌘R)

关于Android Studio 不刷新新版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35439746/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com