- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我在 gradle 构建过程中遇到了这个问题:
org.gradle.tooling.BuildException: Failed to execute aapt
at com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask.invokeAaptForSplit(LinkApplicationAndroidResourcesTask.java:547)
at com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask.doFullTaskAction(LinkApplicationAndroidResourcesTask.java:280)
at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.java:106)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
at org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.doExecute(IncrementalTaskAction.java:46)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:121)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:110)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:60)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:97)
at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:87)
at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:79)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:626)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:581)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.android.ide.common.process.ProcessException: Failed to execute aapt
at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:794)
at com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask.invokeAaptForSplit(LinkApplicationAndroidResourcesTask.java:525)
... 49 more
Caused by: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: Error while executing process /home/local/MPROGA1/malwinder.singh/Desktop/SDK/android-sdk-linux/build-tools/27.0.1/aapt with arguments {package -f --no-crunch -I /home/local/MPROGA1/malwinder.singh/Desktop/SDK/android-sdk-linux/platforms/android-25/android.jar -M /home/local/MPROGA1/malwinder.singh/Desktop/Oversight/app/build/intermediates/manifests/full/debug/AndroidManifest.xml -S /home/local/MPROGA1/malwinder.singh/Desktop/Oversight/app/build/intermediates/res/merged/debug -m -J /home/local/MPROGA1/malwinder.singh/Desktop/Oversight/app/build/generated/source/r/debug -F /home/local/MPROGA1/malwinder.singh/Desktop/Oversight/app/build/intermediates/res/debug/resources-debug.ap_ -D /home/local/MPROGA1/malwinder.singh/Desktop/Oversight/app/build/intermediates/multi-dex/debug/manifest_keep.txt --custom-package com.emerson.oversight -0 apk --output-text-symbols /home/local/MPROGA1/malwinder.singh/Desktop/Oversight/app/build/intermediates/symbols/debug --no-version-vectors}
at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:503)
at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:482)
at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:79)
at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:792)
... 50 more
Caused by: com.android.ide.common.process.ProcessException: Error while executing process /home/local/MPROGA1/malwinder.singh/Desktop/SDK/android-sdk-linux/build-tools/27.0.1/aapt with arguments {package -f --no-crunch -I /home/local/MPROGA1/malwinder.singh/Desktop/SDK/android-sdk-linux/platforms/android-25/android.jar -M /home/local/MPROGA1/malwinder.singh/Desktop/Oversight/app/build/intermediates/manifests/full/debug/AndroidManifest.xml -S /home/local/MPROGA1/malwinder.singh/Desktop/Oversight/app/build/intermediates/res/merged/debug -m -J /home/local/MPROGA1/malwinder.singh/Desktop/Oversight/app/build/generated/source/r/debug -F /home/local/MPROGA1/malwinder.singh/Desktop/Oversight/app/build/intermediates/res/debug/resources-debug.ap_ -D /home/local/MPROGA1/malwinder.singh/Desktop/Oversight/app/build/intermediates/multi-dex/debug/manifest_keep.txt --custom-package com.emerson.oversight -0 apk --output-text-symbols /home/local/MPROGA1/malwinder.singh/Desktop/Oversight/app/build/intermediates/symbols/debug --no-version-vectors}
at com.android.build.gradle.internal.process.GradleProcessResult.buildProcessException(GradleProcessResult.java:73)
at com.android.build.gradle.internal.process.GradleProcessResult.assertNormalExitValue(GradleProcessResult.java:48)
at com.android.builder.internal.aapt.AbstractProcessExecutionAapt$1.onSuccess(AbstractProcessExecutionAapt.java:78)
at com.android.builder.internal.aapt.AbstractProcessExecutionAapt$1.onSuccess(AbstractProcessExecutionAapt.java:74)
at com.google.common.util.concurrent.Futures$CallbackListener.run(Futures.java:1237)
at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
at com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:911)
at com.google.common.util.concurrent.AbstractFuture.complete(AbstractFuture.java:822)
at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:664)
at com.google.common.util.concurrent.SettableFuture.set(SettableFuture.java:48)
at com.android.build.gradle.internal.process.GradleProcessExecutor$1.run(GradleProcessExecutor.java:58)
Caused by: org.gradle.process.internal.ExecException: Process 'command '/home/local/MPROGA1/malwinder.singh/Desktop/SDK/android-sdk-linux/build-tools/27.0.1/aapt'' finished with non-zero exit value 1
at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:382)
at com.android.build.gradle.internal.process.GradleProcessResult.assertNormalExitValue(GradleProcessResult.java:46)
... 9 more
模块级别(内部)build.gradle
:
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
//noinspection GradleDynamicVersion
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'io.fabric'
//For green dao
apply plugin: 'org.greenrobot.greendao'
repositories {
maven { url 'https://maven.fabric.io/public' }
maven { url "https://jitpack.io" }
jcenter()
}
android {
compileSdkVersion 25
buildToolsVersion '27.0.1'
defaultConfig {
applicationId "com.example"
minSdkVersion 16
targetSdkVersion 25
versionCode 3
versionName "1.1.1"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
buildTypes {
release {
lintOptions {
disable 'MissingTranslation'
}
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile('com.crashlytics.sdk.android:crashlytics:2.6.7@aar') {
transitive = true
}
//AppCompat v7 support library
compile 'com.android.support:appcompat-v7:25.3.1'
//AppCompat v4 support library
compile 'com.android.support:support-v4:25.3.1'
//Support design
compile 'com.android.support:design:25.3.1'
//Google Maps
compile 'com.google.android.gms:play-services-maps:11.8.0'
//Retrofit - for making REST API calls
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
//For Runtime permissions
compile 'com.karumi:dexter:4.2.0'
//To set custom fonts
compile 'uk.co.chrisjenx:calligraphy:2.2.0'
//Attaches bullets to viewpager
compile 'com.robohorse.pagerbullet:pagerbullet:1.0.8'
//Expandable recycler view
compile 'com.bignerdranch.android:expandablerecyclerview:3.0.0-RC1'
//For Graph
compile 'com.github.PhilJay:MPAndroidChart:v3.0.2'
//Date time
compile 'com.wdullaer:materialdatetimepicker:3.2.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
testCompile 'junit:junit:4.12'
androidTestCompile 'com.android.support:support-annotations:25.3.1'
androidTestCompile 'com.android.support.test:runner:1.0.1'
androidTestCompile 'com.android.support.test.espresso:espresso-core:3.0.1'
compile 'com.android.support:gridlayout-v7:25.3.1'
compile 'com.jakewharton:butterknife:8.6.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.6.0'
compile 'com.android.support:cardview-v7:25.3.1'
// jCenter
compile 'jp.wasabeef:recyclerview-animators:2.2.6'
compile 'com.ncornette.cache:okcache-control:1.1.1'
compile 'org.greenrobot:greendao:3.2.2'
compile 'net.danlew:android.joda:2.9.9'
compile 'com.github.barteksc:android-pdf-viewer:3.0.0-beta.3'
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile 'org.jetbrains.anko:anko-common:0.8.3'
compile 'me.dm7.barcodescanner:zbar:1.9.8'
// https://mvnrepository.com/artifact/com.openhtmltopdf/openhtmltopdf-parent
compile group: 'com.openhtmltopdf', name: 'openhtmltopdf-parent', version: '0.0.1-RC12', ext: 'pom'
}
主要(外部)build.gradle
:
buildscript {
ext.kotlin_version = '1.2.0'
repositories {
jcenter()
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0-alpha06'
classpath 'org.greenrobot:greendao-gradle-plugin:3.2.2'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
此问题不会出现在 Android Studio 3.0.1 上
最佳答案
试试这个。我试过了,它正在工作。
Android Studio > Help > Check For Update > Configure 并在微调器上选择 Canary Channel,然后单击 ok。清理项目并重新构建后。
关于java - BuildException : Failed to execute aapt in Android Studio 3. 1 金丝雀 6,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48082586/
我经常使用 SSMS 查询数据和构建数据集,我的 IT 部门负责数据库管理。 最近我发现了 Azure Data Studio,我喜欢: 智能感知 源代码控制(例如使用 Git) 来自社区的扩展 SQ
我想根据我使用的 visual studio 版本编译不同的东西,比如 #if VISUAL_STUDIO_VERSION > 2015 eventH?.Invoke(this, EventArgs.
我们的开发团队计划从 visual studio 2005 升级到 visual studio 2010 -- 跳过 visual studio 2008。 大部分项目是VB ASP.NET项目,使用
我的Visual Studio 2015无法构建2010平台工具集。它说: The build tools for Visual Studio 2010 (v100) cannot be found.
我目前正在使用 Visual Studio 2015 来编程 ASP.NET Core 应用程序。我对安装 Visual Studio 2017 有以下疑问: 什么被认为是最佳实践和/或最干净的方法?
尝试从扩展和更新获取 Visual Studio 扩展时,出现以下错误:- 向 visualstudiogallery.msdn.microsoft.com/Services/VStudio/Exte
这个问题在这里已经有了答案: Can Visual Studio Code and VS 2012 be installed on same computer? (1 个回答) 关闭去年。 在安装了
作为标准安装的一部分,Visual Studio Code 带有一个名为“Monokai Dimmed”的颜色主题。 有没有办法将它移植到 Visual Studio 2015?我检查了社区主题( h
我想开始编程 CUDA。 我已经安装了 Visual Studio 2010 Express。 我还安装了 nVidia nSight Visual Studio。 而且我具备所有常见的先决条件(Ne
Visual Studio Community Edition是否可以使用Visual Studio Online帐户上的存储库? 我一直为包含在Online帐户中的Visual Studio Onl
我有一个我一直在开发的应用程序,但在 android studio 上遇到了问题。当我点击“build->run”然后选择我的设备时,应用程序永远不会在我的手机上运行(并且自动出现的android-s
我正在使用Visual Studio2010。我面临的一个问题是,当我创建一个新的Web项目时,Visual Studio将创建该项目,并且不会在解决方案资源管理器中显示其解决方案。 另一件事是,我想
我通读了这里的许多帖子,却找不到一个有效的明确答案。因此,在花了一些时间使它生效之后,我认为应该发布它。 问题:发布配置文件将建立在服务器上,但不会发布。 解: 确保已安装Microsoft Wind
我正在尝试使用Visual Studio 2012构建针对.NET 3.5的C++ CLI应用程序。 通过安装Visual Studio 2008,并指定v90平台工具集,我已经在一台机器上进行了这项
我在 Microsoft Visual Studios 2013 中有一个项目,我想在 Microsoft Visual Studios 2010 中打开它。有什么简单的方法吗?还是我必须在2010年
我想知道,如果我发送一个解决方案文件夹(它是用 visual studio C# 编写的),您可以在 visual studio for mac 中打开解决方案吗? 在visual studio 20
有没有办法在 Visual Studio Code 和 Visual Studio 中设置相同的快捷方式(而不必每次都手动更改它们)? 例如,我在 Visual Studio Code 中经常使用 A
我刚开始了解 Visual Studio Code。我想知道,我可以将 Visual Studio 替换为所有 .NET 开发相关的工作吗? 我可以节省 Visual Studio 许可的成本吗? V
我安装了具有有效许可证(Visual Studio 订阅)的 Visual Studio 2019 企业版(VS 2019 16.1.4),它运行良好。 突然之间,当我尝试打开项目或项目中的任何文件时
我一直在使用 Compass 编译 Windows 环境中的 sass 文件,无论是在命令行上还是使用 Compass-app 来查看目录。 我刚刚开始使用 Visual Studio(专业版 201
我是一名优秀的程序员,十分优秀!