- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我最近从 2.3.3
升级了我们的 android 应用程序的 gradle 插件。至3.0.0
.在解决了大部分编译问题后,我仍然受到以下异常的困扰:
com.android.build.api.transform.TransformException:
com.android.builder.dexing.DexArchiveBuilderException:
com.android.builder.dexing.DexArchiveBuilderException:
Failed to process /Users/{user}/SourceCode/Android/{project_path}/build/intermediates/transforms/profilers-transform/debug/113.jar
{user}
和
{project_path}
字段是实际值的占位符。
Caused by: com.android.builder.dexing.DexArchiveBuilderException: Error while dexing com/outbrain/OBSDK/HttpClient/OBHttpClient.class
)进行 dex 处理。奇怪的是,如果我在内部构建项目,或者如果我构建并生成用于调试和发布的 apk,构建会按预期工作。只有当我尝试在模拟器上部署应用程序时才会收到此错误。
Caused by: com.android.builder.dexing.DexArchiveBuilderException: Failed to process /Users/{user}/SourceCode/Android/{project_path}/build/intermediates/transforms/profilers-transform/debug/113.jar
at com.android.build.gradle.internal.transforms.DexArchiveBuilderTransform.launchProcessing(DexArchiveBuilderTransform.java:550)
at com.android.build.gradle.internal.transforms.DexArchiveBuilderTransform.lambda$convertToDexArchive$1(DexArchiveBuilderTransform.java:488)
at java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1424)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: com.android.builder.dexing.DexArchiveBuilderException: Error while dexing com/outbrain/OBSDK/HttpClient/OBHttpClient.class
at com.android.builder.dexing.DxDexArchiveBuilder.getExceptionToRethrow(DxDexArchiveBuilder.java:143)
at com.android.builder.dexing.DxDexArchiveBuilder.convert(DxDexArchiveBuilder.java:89)
at com.android.build.gradle.internal.transforms.DexArchiveBuilderTransform.launchProcessing(DexArchiveBuilderTransform.java:545)
... 6 more
Caused by: com.android.dx.cf.code.SimException: stack: underflow
at com.android.dx.cf.code.ExecutionStack.throwSimException(ExecutionStack.java:341)
at com.android.dx.cf.code.ExecutionStack.peek(ExecutionStack.java:206)
at com.android.dx.cf.code.ExecutionStack.peekType(ExecutionStack.java:241)
at com.android.dx.cf.code.Simulator$SimVisitor.visitNoArgs(Simulator.java:427)
at com.android.dx.cf.code.BytecodeArray.parseInstruction(BytecodeArray.java:584)
at com.android.dx.cf.code.Simulator.simulate(Simulator.java:103)
at com.android.dx.cf.code.Ropper.processBlock(Ropper.java:790)
at com.android.dx.cf.code.Ropper.doit(Ropper.java:745)
at com.android.dx.cf.code.Ropper.convert(Ropper.java:350)
at com.android.dx.dex.cf.CfTranslator.processMethods(CfTranslator.java:309)
at com.android.dx.dex.cf.CfTranslator.translate0(CfTranslator.java:150)
at com.android.dx.dex.cf.CfTranslator.translate(CfTranslator.java:102)
at com.android.builder.dexing.DxDexArchiveBuilder.dex(DxDexArchiveBuilder.java:107)
at com.android.builder.dexing.DxDexArchiveBuilder.convert(DxDexArchiveBuilder.java:86)
... 7 more
// Top-level build file where you can add configuration options common to all sub-projects/modules.
allprojects {
repositories {
jcenter()
maven {
url 'http://dl.bintray.com/optimizely/optimizely'
}
}
}
buildscript {
repositories {
jcenter()
maven {
url 'https://maven.fabric.io/public'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
// The Fabric Gradle plugin uses an open ended version to
// react quickly to Android tooling updates
classpath 'io.fabric.tools:gradle:1.+'
classpath 'com.jakewharton.hugo:hugo-plugin:1.2.1'
// Kotlin Support
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.51'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'com.jakewharton.hugo'
apply plugin: 'kotlin-android'
repositories {
jcenter()
maven {
url 'https://maven.fabric.io/public'
}
maven {
url "http://appboy.github.io/appboy-android-sdk/sdk"
}
maven {
url "http://dl.bintray.com/teads/TeadsSDK-android"
}
maven {
url "https://jitpack.io"
}
flatDir {
dirs 'libs'
}
google()
}
// Test Dependencies
dependencies {
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:1.10.19'
testCompile 'org.robolectric:robolectric:3.0'
testCompile 'org.robolectric:shadows-multidex:3.0'
testCompile 'org.robolectric:shadows-play-services:3.0'
testCompile 'org.easytesting:fest-assert-core:2.0M10'
// testCompile 'org.easytesting:fest-assert:1.4'
testCompile 'org.powermock:powermock-module-junit4:1.6.4'
testCompile 'org.powermock:powermock-module-junit4-rule:1.6.4'
testCompile 'org.powermock:powermock-api-mockito:1.6.4'
testCompile 'org.powermock:powermock-classloading-xstream:1.6.4'
}
dependencies {
def appCompatVersion = "25.3.1"
def playServicesVersion = "11.0.4"
compile project(':BRShared')
compile project(':CastCompanionLibrary-android')
wearApp project(':wear')
compile fileTree(dir: 'libs', include: '*.jar')
compile(name: 'sharethrough-android-sdk-v4.4.0', ext: 'aar')
compile('com.optimizely:optimizely:+@aar') {
transitive = true
}
compile 'com.android.volley:volley:1.0.0'
compile "com.google.android.gms:play-services:$playServicesVersion"
compile "com.android.support:support-v4:$appCompatVersion"
compile "com.android.support:appcompat-v7:$appCompatVersion"
compile "com.android.support:design:$appCompatVersion"
compile "com.android.support:cardview-v7:$appCompatVersion"
compile "com.android.support:recyclerview-v7:$appCompatVersion"
compile "com.android.support:customtabs:$appCompatVersion"
compile 'com.android.support:support-v4:19.1.0'
compile 'com.android.support:multidex:1.0.1'
compile('com.twitter.sdk.android:tweet-ui:2.3.1@aar') {
transitive = true;
}
compile('com.twitter.sdk.android:twitter-core:2.3.0@aar') {
transitive = true;
}
compile 'com.squareup.okhttp3:okhttp:3.4.2'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.appboy:android-sdk-ui:1.19.0'
// Facebook
compile 'com.facebook.stetho:stetho:1.3.0'
compile 'com.facebook.android:audience-network-sdk:4.26.0'
compile 'com.facebook.android:facebook-android-sdk:4.27.0'
// Inneractive SDK
compile(name: 'ia-mraid-kit-release-7.0.5', ext: 'aar')
compile(name: 'ia-native-kit-release-7.0.5', ext: 'aar')
compile(name: 'ia-sdk-core-full-release-7.0.5', ext: 'aar')
compile(name: 'ia-video-kit-release-7.0.5', ext: 'aar')
compile('com.crashlytics.sdk.android:crashlytics:2.6.7@aar') {
transitive = true;
}
compile('com.crashlytics.sdk.android:crashlytics-ndk:1.1.2@aar') {
transitive = true;
}
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.google.code.gson:gson:2.2.4'
compile 'com.outbrain.obsdk:obsdk:2.1.1'
compile 'org.jetbrains.kotlin:kotlin-stdlib:1.1.3'
compile files('libs/bluekai.jar')
// Reactive
compile 'io.reactivex:rxjava:1.3.0'
compile 'io.reactivex:rxandroid:1.2.1'
// ExoPlayer
compile 'com.google.android.exoplayer:exoplayer:r2.4.0'
// AdobePass
compile files('libs/novacorps-adobepass-client-1.1.0.jar')
compile files('libs/nebula-config-1.3.0.jar')
// Needed in libs directory to avoid missing MVPD model compile error
compile files('libs/android_accessenabler-1.9.1.jar')
// Android Spin Kit UI
compile 'com.github.ybq:Android-SpinKit:1.1.0'
// Teads SDK
compile ('tv.teads.sdk:androidsdk:2.4.14:fullRelease@aar') {
transitive = true;
}
// Material Ripple Layout
compile 'com.balysv:material-ripple:1.0.2'
compile 'org.aspectj:aspectjrt:1.8.1'
// Moshi - JSON Object Mapping
compile 'com.squareup.moshi:moshi:1.5.0'
// GIF Image Library - For Animations
compile 'pl.droidsonroids.gif:android-gif-drawable:1.2.8'
}
android {
compileSdkVersion project.compile_sdk_version.toInteger()
buildToolsVersion project.build_tools_version
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId {application_id}
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
versionCode 31500100
versionName {version_name}
ndk {
abiFilters "armeabi-v7a", "x86"
}
minSdkVersion 19
javaCompileOptions {
annotationProcessorOptions {
includeCompileClasspath true
}
}
}
signingConfigs {
release {
keyAlias {key_alias}
keyPassword {key_password}
storeFile file({file_name})
storePassword {store_password}
}
}
buildTypes {
debug {
minifyEnabled false
applicationIdSuffix '.debug'
versionNameSuffix '-DEBUG'
debuggable true
buildConfigField "boolean", "DEBUG_FORCE_UNICORN_OFF", "false"
buildConfigField "boolean", "DEBUG_STETHO", "true"
// These are the values for the authorities and account types.
resValue "string", "account_type", "{application_id}.debug.accounttype"
resValue "string", "authority", "{application_id}.debug"
resValue "string", "about_version_build", defaultConfig.versionName
resValue "string", "about_version_suffix", "debug"
resValue "string", "outbrain_test_mode", "true"
resValue "bool", "enable_view_server", "true"
resValue "bool", "hockey_app_auto_upload", "false"
resValue "string", "base_feed_url", {base_feed_url}
resValue "string", "path_config", "xmldata/configuration-androidtest"
resValue "string", "google_now_check_credentials_url", "{google_check_credentials_url}"
resValue "string", "google_now_add_credentials_url", "{google_add_credentials_url}"
resValue "string", "google_now_add_activity_url", "{google_add_activity_url}"
resValue "string", "com_appboy_push_gcm_sender_id", "{sender_id}"
resValue "string", "com_appboy_api_key", "{api_key}"
}
release {
ext.enableCrashlytics = true
minifyEnabled false
debuggable false
signingConfig signingConfigs.release
buildConfigField "boolean", "DEBUG_FORCE_UNICORN_OFF", "false"
buildConfigField "boolean", "DEBUG_STETHO", "false"
// Reference them again so they get overwritten by the flavor.
resValue "string", "account_type", "{application_id}.accounttype"
resValue "string", "authority", "{application_id}"
resValue "string", "about_version_build", defaultConfig.versionName
resValue "string", "about_version_suffix", "release"
resValue "string", "outbrain_test_mode", "false"
resValue "bool", "enable_view_server", "false"
resValue "bool", "hockey_app_auto_upload", "true"
resValue "string", "base_feed_url", "{base_feed_url}"
resValue "string", "path_config", "xmldata/configuration-androidv4"
resValue "string", "google_now_check_credentials_url", "{google_check_credentials_url}"
resValue "string", "google_now_add_credentials_url", "{google_add_credentials_url}"
resValue "string", "google_now_add_activity_url", "{google_add_activity_url}"
resValue "string", "com_appboy_push_gcm_sender_id", "{sender_id}"
resValue "string", "com_appboy_api_key", "{api_key}"
}
livesim {
ext.enableCrashlytics = true
versionNameSuffix '-LIVE-SIM'
minifyEnabled false
debuggable false
signingConfig signingConfigs.release
buildConfigField "boolean", "DEBUG_FORCE_UNICORN_OFF", "false"
buildConfigField "boolean", "DEBUG_STETHO", "false"
// Reference them again so they get overwritten by the flavor.
resValue "string", "account_type", "{application_id}.accounttype"
resValue "string", "authority", "{application_id}"
resValue "string", "about_version_build", defaultConfig.versionName
resValue "string", "about_version_suffix", "release"
resValue "string", "outbrain_test_mode", "false"
resValue "bool", "enable_view_server", "false"
resValue "bool", "hockey_app_auto_upload", "true"
resValue "string", "base_feed_url", "{base_feed_url}"
resValue "string", "path_config", "xmldata/configuration-androidv4"
resValue "string", "google_now_check_credentials_url", "{google_check_credentials_url}"
resValue "string", "google_now_add_credentials_url", "{google_add_credentials_url}"
resValue "string", "google_now_add_activity_url", "{google_add_activity_url}"
resValue "string", "com_appboy_push_gcm_sender_id", "{sender_id}"
resValue "string", "com_appboy_api_key", "{api_key}"
// Fallback for sub projects
matchingFallbacks = ['release']
}
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src/main']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
instrumentTest.setRoot('tests')
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
livesim.setRoot('build-types/livesim')
}
dexOptions {
jumboMode true
preDexLibraries = false
javaMaxHeapSize "6g"
}
lintOptions {
checkReleaseBuilds false
abortOnError false
}
testOptions {
unitTests.returnDefaultValues = true
}
}
android.applicationVariants.all { variant ->
variant.outputs.all { output ->
def buildType = variant.variantData.variantConfiguration.buildType.name
outputFileName = "{Application_Name}-" + (buildType == "release" || buildType == "livesim" ? "release-" : "") + "${variant.versionName}.apk"
}
}
dependencies {
compile 'com.android.support.constraint:constraint-layout:+'
}
最佳答案
我已经找到了我的问题的答案,但如果有人仍在寻找答案,我将在此处发布我的解决方案:
事实证明,问题是在启用了 Advanced Profiling 字段的模拟器/物理设备上安装调试版本。这是在 Android Studio 3.0 中启用的一项功能,它允许开发人员从 Android Profiler 的输出中获取更精确和详细的信息。
要求的描述有点误导恕我直言。它表明它需要 API 版本 小于 版本。 26 但事实并非如此(至少对我来说不是)。似乎只能在 API 版本上成功构建 大于 版本。 26 如果您选择启用它。它可能与更新的 Multi-Dex 支持库有关,在 Advanced Profiler 需要它们时,它还没有清除所有方法,但似乎没有关于发生了什么的任何细节。
如果您在低于版本的设备上运行构建。 26(即 Android O),尝试禁用运行配置中的字段(它位于 Edit Run Configurations 窗口中的 Profiling 选项卡下)。
Advanced Profiling Field in Run Configurations
希望有帮助!
关于android - 迁移到 Gradle 插件 3.0 后编译时出现 DexArchiveBuilderException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47063890/
SQLite、Content provider 和 Shared Preference 之间的所有已知区别。 但我想知道什么时候需要根据情况使用 SQLite 或 Content Provider 或
警告:我正在使用一个我无法完全控制的后端,所以我正在努力解决 Backbone 中的一些注意事项,这些注意事项可能在其他地方更好地解决......不幸的是,我别无选择,只能在这里处理它们! 所以,我的
我一整天都在挣扎。我的预输入搜索表达式与远程 json 数据完美配合。但是当我尝试使用相同的 json 数据作为预取数据时,建议为空。点击第一个标志后,我收到预定义消息“无法找到任何内容...”,结果
我正在制作一个模拟 NHL 选秀彩票的程序,其中屏幕右侧应该有一个 JTextField,并且在左侧绘制弹跳的选秀球。我创建了一个名为 Ball 的类,它实现了 Runnable,并在我的主 Draf
这个问题已经有答案了: How can I calculate a time span in Java and format the output? (18 个回答) 已关闭 9 年前。 这是我的代码
我有一个 ASP.NET Web API 应用程序在我的本地 IIS 实例上运行。 Web 应用程序配置有 CORS。我调用的 Web API 方法类似于: [POST("/API/{foo}/{ba
我将用户输入的时间和日期作为: DatePicker dp = (DatePicker) findViewById(R.id.datePicker); TimePicker tp = (TimePic
放宽“邻居”的标准是否足够,或者是否有其他标准行动可以采取? 最佳答案 如果所有相邻解决方案都是 Tabu,则听起来您的 Tabu 列表的大小太长或您的释放策略太严格。一个好的 Tabu 列表长度是
我正在阅读来自 cppreference 的代码示例: #include #include #include #include template void print_queue(T& q)
我快疯了,我试图理解工具提示的行为,但没有成功。 1. 第一个问题是当我尝试通过插件(按钮 1)在点击事件中使用它时 -> 如果您转到 Fiddle,您会在“内容”内看到该函数' 每次点击都会调用该属
我在功能组件中有以下代码: const [ folder, setFolder ] = useState([]); const folderData = useContext(FolderContex
我在使用预签名网址和 AFNetworking 3.0 从 S3 获取图像时遇到问题。我可以使用 NSMutableURLRequest 和 NSURLSession 获取图像,但是当我使用 AFHT
我正在使用 Oracle ojdbc 12 和 Java 8 处理 Oracle UCP 管理器的问题。当 UCP 池启动失败时,我希望关闭它创建的连接。 当池初始化期间遇到 ORA-02391:超过
关闭。此题需要details or clarity 。目前不接受答案。 想要改进这个问题吗?通过 editing this post 添加详细信息并澄清问题. 已关闭 9 年前。 Improve
引用这个plunker: https://plnkr.co/edit/GWsbdDWVvBYNMqyxzlLY?p=preview 我在 styles.css 文件和 src/app.ts 文件中指定
为什么我的条形这么细?我尝试将宽度设置为 1,它们变得非常厚。我不知道还能尝试什么。默认厚度为 0.8,这是应该的样子吗? import matplotlib.pyplot as plt import
当我编写时,查询按预期执行: SELECT id, day2.count - day1.count AS diff FROM day1 NATURAL JOIN day2; 但我真正想要的是右连接。当
我有以下时间数据: 0 08/01/16 13:07:46,335437 1 18/02/16 08:40:40,565575 2 14/01/16 22:2
一些背景知识 -我的 NodeJS 服务器在端口 3001 上运行,我的 React 应用程序在端口 3000 上运行。我在 React 应用程序 package.json 中设置了一个代理来代理对端
我面临着一个愚蠢的问题。我试图在我的 Angular 应用程序中延迟加载我的图像,我已经尝试过这个2: 但是他们都设置了 src attr 而不是 data-src,我在这里遗漏了什么吗?保留 d
我是一名优秀的程序员,十分优秀!