Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: failed linking file resources ...platforms\android\app\src\main\res\xml\authenticator.xml:2: AAPT: error: resource mipmap/icon (aka xxx.xxx:mipmap/icon) not found. #553

Open
delacuestajs opened this issue Feb 22, 2019 · 30 comments

Comments

@delacuestajs
Copy link

@delacuestajs delacuestajs commented Feb 22, 2019

Your Environment

  • Plugin version: 3.0.0-alpha.50
  • Platform: Android
  • OS version: Android 9
  • Device manufacturer and model: OnePlus A3000 (oneplus 3t)
  • Running in Simulator:
  • Cordova version (cordova -v): 8.1.2 (cordova-lib@8.1.1)
  • Cordova platform version (cordova platform ls): android 8.0.0
  • Plugin configuration options:
  • Link to your project:

Context

  • What went wrong:
    Execution failed for task ':app:processDebugResources'.

Android resource linking failed
...platforms\android\app\src\main\res\xml\authenticator.xml:2: AAPT: error: resource mipmap/icon (aka xx.xxx:mipmap/icon) not found.

error: failed linking file resources.

Expected Behavior

BUILD SUCCESS

Actual Behavior

BUILD FAILED

Possible Fix

Steps to Reproduce

  1. cordova create ...
  2. cordova plugin add cordova-plugin-background-geolocation
  3. cordova platform add android@latest
  4. cordova run

Context

BUILD FAILING

Debug logs

This is line 2 of the file authenticator.xml

account-authenticator android:accountType="@string/mauron85_bgloc_account_type" android:icon="@mipmap/icon" android:label="@string/app_name" android:smallIcon="@mipmap/icon" xmlns:android="http://schemas.android.com/apk/res/android"

@baversjo

This comment has been minimized.

Copy link

@baversjo baversjo commented Feb 27, 2019

I have the exact same problem, had to downgrade target api version.

@baversjo

This comment has been minimized.

Copy link

@baversjo baversjo commented Feb 28, 2019

On newer API versions, you need to set SMALL_ICON and ICON to @mipmap/ic_launcher in both package.json and config.xml
After that I had to recreate the android platform for it to "take". cordova platform remove android && cordova platform add android.

@baversjo

This comment has been minimized.

Copy link

@baversjo baversjo commented Feb 28, 2019

@mauron85 looks like you may have to make the default icon path dynamic depending on what sdk version / cordova version you're compiling to, on API level 26 and cordova-android 8.0.0 the path has changed from icon to ic_launcher it seems.

@Amsvartner

This comment has been minimized.

Copy link

@Amsvartner Amsvartner commented Mar 4, 2019

This happened to me as well. For me, I had added the platform android@latest to my Cordova 8.1.2 project. I removed the android platform and added it again without appending @latest, which solved the problem for me.

@TdoubleG

This comment has been minimized.

Copy link

@TdoubleG TdoubleG commented Mar 16, 2019

@baversjo
I did change the variables to ic_launcher but this leads me to this error:
#558

Do you had the same problem with the junit.framework?

It has definetly have something to do with the app icon. Changing not from @mipmap/icon to @mipmap/ic_launcher causes the error, that icon not found. changing from icon to ic_launcher cauces that junit.framework couldn't be found..

@deadraid

This comment has been minimized.

Copy link

@deadraid deadraid commented Mar 18, 2019

@baversjo
I did change the variables to ic_launcher but this leads me to this error:
#558

Do you had the same problem with the junit.framework?

It has definetly have something to do with the app icon. Changing not from @mipmap/icon to @mipmap/ic_launcher causes the error, that icon not found. changing from icon to ic_launcher cauces that junit.framework couldn't be found..

add in file -- platforms/android/cordova-plugin-mauron85-background-geolocation/rep-dependencies.gradle
the string
compile 'junit:junit:4.12'
after dependencies {

@TdoubleG

This comment has been minimized.

Copy link

@TdoubleG TdoubleG commented Mar 19, 2019

Unfortunately it doesn't work.

I got some other errors preventing the build:

> Task :app:transformClassesWithDexBuilderForDebug
BUILD FAILED in 40s
34 actionable tasks: 11 executed, 23 up-to-date
/../Desktop/dev/customers/Polizeikontrollen/platforms/android/gradlew: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
D8: Type com.google.android.gms.common.internal.zzf is referenced as an interface from `com.google.android.gms.internal.zzhv`.
D8: Type com.google.android.gms.common.internal.zzg is referenced as an interface from `com.google.android.gms.internal.zzhw`.
D8: Type com.google.android.gms.common.internal.zzf is referenced as an interface from `com.google.android.gms.internal.zzcar`.
com.android.builder.dexing.DexArchiveBuilderException: com.android.builder.dexing.DexArchiveBuilderException: Failed to process /../.gradle/caches/transforms-1/files-1.1/play-services-ads-11.0.4.aar/32610580b004c3897c4feb772e218069/jars/classes.jar
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:593)
        at java.util.concurrent.ForkJoinTask.reportException(ForkJoinTask.java:677)
        at java.util.concurrent.ForkJoinTask.join(ForkJoinTask.java:720)
        at com.android.ide.common.internal.WaitableExecutor.waitForTasksWithQuickFail(WaitableExecutor.java:146)
        at com.android.build.gradle.internal.transforms.DexArchiveBuilderTransform.transform(DexArchiveBuilderTransform.java:420)
        at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:239)
        at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:235)
        at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:102)
        at com.android.build.gradle.internal.pipeline.TransformTask.transform(TransformTask.java:230)
        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:50)
        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:131)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:301)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:293)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:175)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
        at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:120)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:99)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:77)
        at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
        at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59)
        at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:59)
        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:101)
        at org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.java:44)
        at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:91)
        at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:59)
        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.api.internal.tasks.execution.EventFiringTaskExecuter$1.run(EventFiringTaskExecuter.java:51)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:301)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:293)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:175)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
        at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:46)
        at org.gradle.execution.taskgraph.LocalTaskInfoExecutor.execute(LocalTaskInfoExecutor.java:42)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareWorkItemExecutor.execute(DefaultTaskExecutionGraph.java:277)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareWorkItemExecutor.execute(DefaultTaskExecutionGraph.java:262)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:135)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:130)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.execute(DefaultTaskPlanExecutor.java:200)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.executeWithWork(DefaultTaskPlanExecutor.java:191)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.run(DefaultTaskPlanExecutor.java:130)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:74)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph.execute(DefaultTaskExecutionGraph.java:143)
        at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:40)
        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:40)
        at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:24)
        at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:46)
        at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:49)
        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:40)
        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:33)
        at org.gradle.initialization.DefaultGradleLauncher$ExecuteTasks.run(DefaultGradleLauncher.java:355)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:301)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:293)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:175)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
        at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
        at org.gradle.initialization.DefaultGradleLauncher.runTasks(DefaultGradleLauncher.java:219)
        at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:149)
        at org.gradle.initialization.DefaultGradleLauncher.executeTasks(DefaultGradleLauncher.java:124)
        at org.gradle.internal.invocation.GradleBuildController$1.call(GradleBuildController.java:77)
        at org.gradle.internal.invocation.GradleBuildController$1.call(GradleBuildController.java:74)
        at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:154)
        at org.gradle.internal.work.StopShieldingWorkerLeaseService.withLocks(StopShieldingWorkerLeaseService.java:38)
        at org.gradle.internal.invocation.GradleBuildController.doBuild(GradleBuildController.java:96)
        at org.gradle.internal.invocation.GradleBuildController.run(GradleBuildController.java:74)
        at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
        at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
        at org.gradle.tooling.internal.provider.ValidatingBuildActionRunner.run(ValidatingBuildActionRunner.java:32)
        at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.run(RunAsBuildOperationBuildActionRunner.java:50)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:301)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:293)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:175)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
        at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
        at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner.run(RunAsBuildOperationBuildActionRunner.java:45)
        at org.gradle.tooling.internal.provider.SubscribableBuildActionRunner.run(SubscribableBuildActionRunner.java:51)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter$1.transform(InProcessBuildActionExecuter.java:47)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter$1.transform(InProcessBuildActionExecuter.java:44)
        at org.gradle.composite.internal.DefaultRootBuildState.run(DefaultRootBuildState.java:79)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:44)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:30)
        at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:39)
        at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:25)
        at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:80)
        at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:53)
        at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:62)
        at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:34)
        at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:36)
        at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:25)
        at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:43)
        at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:29)
        at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:59)
        at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:31)
        at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:59)
        at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:44)
        at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:46)
        at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:30)
        at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:67)
        at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
        at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
        at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
        at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
        at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
        at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
        at org.gradle.util.Swapper.swap(Swapper.java:38)
        at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
        at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
        at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:62)
        at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
        at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:81)
        at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
        at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
        at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:295)
        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.builder.dexing.DexArchiveBuilderException: Failed to process /../.gradle/caches/transforms-1/files-1.1/play-services-ads-11.0.4.aar/32610580b004c3897c4feb772e218069/jars/classes.jar
        at com.android.build.gradle.internal.transforms.DexArchiveBuilderTransform.launchProcessing(DexArchiveBuilderTransform.java:909)
        at com.android.build.gradle.internal.transforms.DexArchiveBuilderTransform.lambda$convertToDexArchive$6(DexArchiveBuilderTransform.java:834)
        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.
        at com.android.builder.dexing.D8DexArchiveBuilder.getExceptionToRethrow(D8DexArchiveBuilder.java:124)
        at com.android.builder.dexing.D8DexArchiveBuilder.convert(D8DexArchiveBuilder.java:101)
        at com.android.build.gradle.internal.transforms.DexArchiveBuilderTransform.launchProcessing(DexArchiveBuilderTransform.java:904)
        ... 6 more
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete
        at com.android.tools.r8.utils.ExceptionUtils.withCompilationHandler(ExceptionUtils.java:70)
        at com.android.tools.r8.utils.ExceptionUtils.withD8CompilationHandler(ExceptionUtils.java:43)
        at com.android.tools.r8.D8.run(D8.java:94)
        at com.android.builder.dexing.D8DexArchiveBuilder.convert(D8DexArchiveBuilder.java:99)
        ... 7 more
Caused by: com.android.tools.r8.utils.AbortException: Error: Type com.google.android.gms.common.internal.zzf is referenced as an interface from `com.google.android.gms.internal.zzhv`.
        at com.android.tools.r8.utils.Reporter.failIfPendingErrors(Reporter.java:89)
        at com.android.tools.r8.utils.Reporter.fatalError(Reporter.java:60)
        at com.android.tools.r8.utils.ExceptionUtils.withCompilationHandler(ExceptionUtils.java:64)
        ... 10 more
@DannyRidgway

This comment has been minimized.

Copy link

@DannyRidgway DannyRidgway commented Mar 19, 2019

I have the same issue too. Going to roll-back to cordova 7.1.1 until this is fixed.

@henkkelder

This comment has been minimized.

Copy link

@henkkelder henkkelder commented Apr 2, 2019

In my case the @mipmap/icon problem was solved by following the instructions in this example:
https://github.com/oliviercherrier/mauron85-background-geolocation-example-ionic2
See the text below 'Mimap icon missing'.

@TomDemulierChevret

This comment has been minimized.

Copy link

@TomDemulierChevret TomDemulierChevret commented Apr 2, 2019

This is not a good practice, you should not edit manually the content of platform folders since they can be recreated at some point (for exemple in a CI environnment).

Switching from @mipmap/icon to @mipmap/ic_launcher in your package.json and config.xml should be solution with the 3.0.0 release (don't forget to reinstall platforms and plugins).

@henkkelder

This comment has been minimized.

Copy link

@henkkelder henkkelder commented Apr 2, 2019

Agree, actually I added the following to my config.xml:
<resource-file src="assets/ic_launcher.png" target="app/src/main/res/mipmap/icon.png" />

@globules-io

This comment has been minimized.

Copy link

@globules-io globules-io commented Apr 6, 2019

Reusing the "main" icon here

<icon src="res/icons/icon.png" />
<resource-file src="res/icons/icon.png" target="app/src/main/res/mipmap/icon.png" />
@UTSOURCE

This comment has been minimized.

Copy link

@UTSOURCE UTSOURCE commented Apr 11, 2019

@delacuestajs
Have you solved this problem? How to solve the problem, please tell me, thank you!!! I also have this problem.

@ellecito

This comment has been minimized.

Copy link

@ellecito ellecito commented Apr 15, 2019

Agree, actually I added the following to my config.xml:
<resource-file src="assets/ic_launcher.png" target="app/src/main/res/mipmap/icon.png" />

This works for me, thanks!

@ioclaudio

This comment has been minimized.

Copy link

@ioclaudio ioclaudio commented Apr 16, 2019

I have the same problem with:

  • "cordova-plugin-mauron85-background-geolocation": "^2.3.6",
  • cordova --version: 9.0.0 (cordova-lib@9.0.1)
  • Cordova Platforms : android 8.0.0
  • ionic (Ionic CLI) : 4.12.0
  • OS: Windows 10
@Divyanshu30

This comment has been minimized.

Copy link

@Divyanshu30 Divyanshu30 commented Apr 30, 2019

Agree, actually I added the following to my config.xml:
<resource-file src="assets/ic_launcher.png" target="app/src/main/res/mipmap/icon.png" />
where to add this line

@geoox

This comment has been minimized.

Copy link

@geoox geoox commented May 9, 2019

Agree, actually I added the following to my config.xml:
<resource-file src="assets/ic_launcher.png" target="app/src/main/res/mipmap/icon.png" />

Actually for me to work I had to modify it to
<resource-file src="SRC/assets/ic_launcher.png" target="app/src/main/res/mipmap/icon.png" />

and to manually copy a 'ic_launcher.png' resource from the path: platforms/android/app/src/main/res/mipmap-xxhdpi' to the folder: src/assets

@henkkelder

This comment has been minimized.

Copy link

@henkkelder henkkelder commented May 12, 2019

I think the solution lies just in a correct declaration in config.xml:

<plugin name="@mauron85/cordova-plugin-background-geolocation" spec="3.0.3">
    <variable name="GOOGLE_PLAY_SERVICES_VERSION" value="11.6.2" />
    <variable name="ANDROID_SUPPORT_LIBRARY_VERSION" value="26+" />
    <variable name="ICON" value="@mipmap/icon" />
    <variable name="SMALL_ICON" value="@mipmap/icon" />
    <variable name="ACCOUNT_NAME" value="@string/app_name" />
    <variable name="ACCOUNT_LABEL" value="@string/app_name" />
    <variable name="ACCOUNT_TYPE" value="$PACKAGE_NAME.account" />
    <variable name="CONTENT_AUTHORITY" value="$PACKAGE_NAME" />
    <variable name="ALWAYS_USAGE_DESCRIPTION" value="Om de drukte het op terrein te kunnen monitoren" />
    <variable name="MOTION_USAGE_DESCRIPTION" value="Om de drukte het op terrein te kunnen monitoren" />
</plugin>
@ioclaudio

This comment has been minimized.

Copy link

@ioclaudio ioclaudio commented May 14, 2019

I think the solution lies just in a correct declaration in config.xml:

I've the same configuration, but the error is the same:

`Execution failed for task ':app:processDebugResources'.

Android resource linking failed
C:\xxxxx\platforms\android\app\src\main\res\xml\authenticator.xml:2: AAPT: error: resource mipmap/icon (aka com.bitmobility.app:mipmap/icon) not found.

error: failed linking file resources.`

@megadrazz

This comment has been minimized.

Copy link

@megadrazz megadrazz commented May 15, 2019

crie pasta "mipmap" platforms\android\app\src\main\res\mipmap coloque seu icon na pasta "icon.png" pronto resolvido

create folder "mipmap" platforms\android\app\src\main\res\mipmap place your icon in the "icon.png" folder ready resolved

@NaoufalALAOUI

This comment has been minimized.

Copy link

@NaoufalALAOUI NaoufalALAOUI commented May 21, 2019

Agree, actually I added the following to my config.xml:
<resource-file src="assets/ic_launcher.png" target="app/src/main/res/mipmap/icon.png" />

in which line you adete?

@ITKing80

This comment has been minimized.

Copy link

@ITKing80 ITKing80 commented May 29, 2019

this issue happens on cordova andoird 8
Downgrade your cordova android to 7. On my machine, it's fixed.

cordova platform remove android
cordova platform add android@^7

@tamsel12

This comment has been minimized.

Copy link

@tamsel12 tamsel12 commented Jun 20, 2019

Without downgrading the cordova android version is there any possible solution to fix this issue ?

@TomDemulierChevret

This comment has been minimized.

Copy link

@TomDemulierChevret TomDemulierChevret commented Jun 20, 2019

This declaration :

    <plugin name="@mauron85/cordova-plugin-background-geolocation" spec="3.0.3">
        <variable name="GOOGLE_PLAY_SERVICES_VERSION" value="11+" />
        <variable name="ANDROID_SUPPORT_LIBRARY_VERSION" value="26+" />
        <variable name="ICON" value="@mipmap/ic_launcher" />
        <variable name="SMALL_ICON" value="@mipmap/ic_launcher" />
        <variable name="ACCOUNT_NAME" value="@string/app_name" />
        <variable name="ACCOUNT_LABEL" value="@string/app_name" />
        <variable name="ACCOUNT_TYPE" value="$PACKAGE_NAME.account" />
        <variable name="CONTENT_AUTHORITY" value="$PACKAGE_NAME" />
    </plugin>

Works for me with :

  • cordova 8.1.2
  • cordova-android 8.0.0
  • cordova-ios 5.0.0
  • ionic cli 4.12.0

I don't have the ALWAYS_USAGE_DESCRIPTION and MOTION_USAGE_DESCRIPTION keys because I handle iOS permission messages differently but you should include them too.

@PimentLajiao

This comment has been minimized.

Copy link

@PimentLajiao PimentLajiao commented Jun 21, 2019

Unfortunatly, this declaration didn't work for me.

I finally, succeeded to build my app by duplicating and renaming all images "ic_launcher.png" to "icon.png" in "platforms/android/app/src/res/mipmap-*" folders.

@sonicwong

This comment has been minimized.

Copy link

@sonicwong sonicwong commented Jul 2, 2019

Just add below line to config.xml (inside <platform name="android"> tag)
This will reuse the pre-generated icon.

<resource-file src="resources/android/icon/drawable-xxxhdpi-icon.png" target="app/src/main/res/mipmap/icon.png" />

@s-valladares

This comment has been minimized.

Copy link

@s-valladares s-valladares commented Jul 2, 2019

Just add below line to config.xml (inside <platform name="android"> tag)
This will reuse the pre-generated icon.

<resource-file src="resources/android/icon/drawable-xxxhdpi-icon.png" target="app/src/main/res/mipmap/icon.png" />

Thanks, after two days I have managed to solve it with this.

@edwardbrosens

This comment has been minimized.

Copy link

@edwardbrosens edwardbrosens commented Jul 13, 2019

Just add below line to config.xml (inside <platform name="android"> tag)
This will reuse the pre-generated icon.

<resource-file src="resources/android/icon/drawable-xxxhdpi-icon.png" target="app/src/main/res/mipmap/icon.png" />

Worked for me too.

rubencapitao93 pushed a commit to rubencapitao93/cordova-plugin-background-geolocation that referenced this issue Aug 2, 2019
Rúben Capitão
quick-fix for issue mauron85#553
rubencapitao93 added a commit to rubencapitao93/cordova-plugin-background-geolocation that referenced this issue Aug 2, 2019
dilawar added a commit to dilawar/HippoApp that referenced this issue Aug 16, 2019
@anRoswell

This comment has been minimized.

Copy link

@anRoswell anRoswell commented Aug 28, 2019

<resource-file src="resources/android/icon/drawable-xxxhdpi-icon.png" target="app/src/main/res/mipmap/icon.png" />

Gracias @sonicwong me salvastes la vida, me pase todo una tarde probando y buscando, te agradezco mucho tu aporte.

@SurekhaNetisoft

This comment has been minimized.

Copy link

@SurekhaNetisoft SurekhaNetisoft commented Sep 30, 2019

Am getting this error while building my ionic4 app
in package.json I changed small icon and icon images ,from icon to ic_laucher because in mipmap folder I have ic_launcher.png images only.

Execution failed for task ':app:processDebugResources'.

Android resource linking failed
/home/netisoft/Updated/OpporMan/platforms/android/app/src/main/res/xml/authenticator.xml:2: AAPT: error: resource mipmap/icon (aka io.ionic.opporman:mipmap/icon) not found.
Please any one help me to come out of this issue.Thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
You can’t perform that action at this time.