I can't open Android version after upgrade to Nativescript 4.1

android

#1

Hi guys,
I am trying to open the Android version of my app after I upgrade the Nativescript to version 4.1.

When I run tns run android I get this :

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.
> com.android.build.api.transform.TransformException: Error while generating the main dex list.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 26s
Unable to apply changes on device: BPN7N18315016632. Error is: Command ./gradlew failed with exit code 1.

This is my configuration:
package.json

{

  "nativescript": {
    "id": "com.tappter.pim",
    "tns-ios": {
      "version": "4.1.0"
    },
    "tns-android": {
      "version": "4.1.3"
    }
  },
  "dependencies": {
    "@angular/animations": "~6.0.0",
    "@angular/common": "~6.0.0",
    "@angular/compiler": "~6.0.0",
    "@angular/core": "~6.0.0",
    "@angular/forms": "~6.0.0",
    "@angular/http": "~6.0.0",
    "@angular/platform-browser": "~6.0.0",
    "@angular/platform-browser-dynamic": "~6.0.0",
    "@angular/router": "~6.0.0",
    "@ngx-translate/core": "^9.1.1",
    "core-js": "2.5.0",
    "emoji-strip": "^1.0.1",
    "libphonenumber-js": "^1.0.7",
    "moment": "^2.19.1",
    "nativescript-accelerometer": "2.0.1",
    "nativescript-advanced-webview": "^2.0.2",
    "nativescript-angular": "^6.0.0",
    "nativescript-appversion": "1.4.1",
    "nativescript-bottom-navigation": "^1.3.0",
    "nativescript-camera": "^4.0.2",
    "nativescript-cardview": "2.0.2",
    "nativescript-checkbox": "^3.0.1",
    "nativescript-contacts-lite": "^0.2.4",
    "nativescript-couchbase": "^1.0.18",
    "nativescript-email": "1.5.1",
    "nativescript-globalevents": "^1.1.2",
    "nativescript-imagecropper": "^0.1.2",
    "nativescript-imagepicker": "^6.0.1",
    "nativescript-iqkeyboardmanager": "^1.3.0",
    "nativescript-loading-indicator": "^2.4.0",
    "nativescript-lottie": "^1.4.0",
    "nativescript-masked-text-field": "^2.0.2",
    "nativescript-mixpanel": "2.0.1",
    "nativescript-modal-datetimepicker": "^1.1.3",
    "nativescript-ngx-fonticon": "^4.1.0",
    "nativescript-onesignal": "^1.0.7",
    "nativescript-pager": "^7.2.3",
    "nativescript-permissions": "1.2.3",
    "nativescript-phone": "1.3.1",
    "nativescript-status-bar": "1.1.1",
    "nativescript-telephony": "^1.0.4",
    "nativescript-theme-core": "1.0.4",
    "nativescript-toast": "1.4.6",
    "nativescript-trace-raven": "1.1.1",
    "nativescript-ui-dataform": "^3.6.0",
    "nativescript-ui-listview": "^3.5.5",
    "nativescript-web-image-cache": "^4.2.2",
    "random-id": "0.0.2",
    "reflect-metadata": "0.1.8",
    "rxjs": "~6.0.0 || >=6.1.0",
    "rxjs-compat": "^6.2.1",
    "tns-core-modules": "^4.1.0",
    "tns-core-modules-widgets": "^4.1.0",
    "zone.js": "^0.8.26"
  },
  "devDependencies": {
    "@angular-devkit/core": "~0.6.3",
    "@angular/compiler-cli": "~5.0.0",
    "@ngtools/webpack": "~6.0.3",
    "babel-traverse": "6.4.5",
    "babel-types": "6.4.5",
    "babylon": "6.4.5",
    "clean-webpack-plugin": "~0.1.19",
    "copy-webpack-plugin": "~4.5.1",
    "css-loader": "~0.28.11",
    "extract-text-webpack-plugin": "~3.0.2",
    "lazy": "1.0.11",
    "nativescript-css-loader": "~0.26.0",
    "nativescript-custom-entitlements": "^0.2.0",
    "nativescript-dev-assets": "0.0.6",
    "nativescript-dev-typescript": "^0.7.1",
    "nativescript-dev-webpack": "^0.12.0",
    "nativescript-worker-loader": "~0.9.0",
    "raw-loader": "~0.5.1",
    "resolve-url-loader": "~2.3.0",
    "tns-platform-declarations": "3.1.1",
    "typescript": "~2.7.2",
    "uglifyjs-webpack-plugin": "~1.2.5",
    "webpack": "~4.6.0",
    "webpack-bundle-analyzer": "~2.13.0",
    "webpack-cli": "~2.1.3",
    "webpack-sources": "~1.1.0"
  }
}

app.gradle

dependencies {
//	compile 'com.android.support:recyclerview-v7:+'
  compile 'com.google.android.gms:play-services-gcm:11.8.0'
}

configurations.all {
    resolutionStrategy {
        force "com.google.android.gms:play-services-gcm:11.8.0"
        force "com.google.android.gms:play-services-location:11.8.0"
    }
    resolutionStrategy.eachDependency { details ->
        def requested = details.requested
        if (requested.group == 'com.android.support') {
            if (!requested.name.startsWith("multidex")) {
                details.useVersion '27.0.2'
            }
        }
    }
}

android {
    defaultConfig {
        generatedDensities = []
        applicationId = "com.tappter.pim"
        multiDexEnabled true
        manifestPlaceholders = [
                manifestApplicationId: "${applicationId}",
                onesignal_app_id : "***",
                onesignal_google_project_number: "***"
        ]
    }
    aaptOptions {
        additionalParameters "--no-version-vectors"
    }
}

repositories {
    maven { url 'https://maven.google.com' }
}

dependencies {
    compile 'com.onesignal:OneSignal:[3.6.2, 3.99.99]'
}

Full log

18:50:26.877 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
18:50:26.877 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
18:50:26.877 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
18:50:26.877 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.
18:50:26.877 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > com.android.build.api.transform.TransformException: Error while generating the main dex list.
18:50:26.877 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
18:50:26.877 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Try:
18:50:26.877 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]  Run with --scan to get full insights.
18:50:26.878 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
18:50:26.878 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Exception is:
18:50:26.878 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.
18:50:26.878 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100)
18:50:26.878 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
18:50:26.879 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
18:50:26.879 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
18:50:26.879 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
18:50:26.879 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:60)
18:50:26.879 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:97)
18:50:26.879 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:87)
18:50:26.879 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
18:50:26.879 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
18:50:26.879 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
18:50:26.879 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
18:50:26.879 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
18:50:26.879 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
18:50:26.880 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
18:50:26.880 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
18:50:26.880 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
18:50:26.880 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
18:50:26.880 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
18:50:26.880 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
18:50:26.880 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123)
18:50:26.880 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:79)
18:50:26.880 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104)
18:50:26.880 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98)
18:50:26.880 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:626)
18:50:26.880 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:581)
18:50:26.880 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98)
18:50:26.880 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
18:50:26.880 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
18:50:26.880 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
18:50:26.880 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Caused by: java.lang.RuntimeException: com.android.build.api.transform.TransformException: Error while generating the main dex list.
18:50:26.881 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.builder.profile.Recorder$Block.handleException(Recorder.java:55)
18:50:26.881 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:104)
18:50:26.881 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.build.gradle.internal.pipeline.TransformTask.transform(TransformTask.java:212)
18:50:26.881 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
18:50:26.881 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.doExecute(IncrementalTaskAction.java:46)
18:50:26.881 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)
18:50:26.881 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)
18:50:26.881 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:121)
18:50:26.881 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
18:50:26.881 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
18:50:26.881 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
18:50:26.882 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
18:50:26.882 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:110)
18:50:26.882 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
18:50:26.882 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   ... 29 more
18:50:26.882 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Caused by: com.android.build.api.transform.TransformException: Error while generating the main dex list.
18:50:26.882 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.build.gradle.internal.transforms.D8MainDexListTransform.transform(D8MainDexListTransform.kt:127)
18:50:26.882 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:221)
18:50:26.882 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:217)
18:50:26.882 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:102)
18:50:26.882 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   ... 41 more
18:50:26.882 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Caused by: com.android.builder.multidex.D8MainDexList$MainDexListException: com.android.tools.r8.errors.CompilationError: Program type already present: com.google.android.gms.common.api.internal.zzda
18:50:26.883 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.builder.multidex.D8MainDexList.generate(D8MainDexList.java:87)
18:50:26.883 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.build.gradle.internal.transforms.D8MainDexListTransform.transform(D8MainDexListTransform.kt:114)
18:50:26.883 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   ... 44 more
18:50:26.883 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Caused by: com.android.tools.r8.errors.CompilationError: Program type already present: com.google.android.gms.common.api.internal.zzda
18:50:26.883 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.tools.r8.utils.ProgramClassCollection.resolveClassConflictImpl(ProgramClassCollection.java:64)
18:50:26.883 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.tools.r8.utils.ProgramClassCollection.lambda$create$0(ProgramClassCollection.java:25)
18:50:26.883 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.tools.r8.utils.ProgramClassCollection.create(ProgramClassCollection.java:24)
18:50:26.883 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.tools.r8.graph.LazyLoadedDexApplication$Builder.build(LazyLoadedDexApplication.java:121)
18:50:26.883 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.tools.r8.dex.ApplicationReader.read(ApplicationReader.java:122)
18:50:26.883 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.tools.r8.dex.ApplicationReader.read(ApplicationReader.java:86)
18:50:26.884 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.tools.r8.GenerateMainDexList.run(GenerateMainDexList.java:40)
18:50:26.884 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.tools.r8.GenerateMainDexList.run(GenerateMainDexList.java:110)
18:50:26.884 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.builder.multidex.D8MainDexList.generate(D8MainDexList.java:83)
18:50:26.884 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   ... 45 more
18:50:26.884 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
18:50:26.884 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
18:50:26.884 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Get more help at https://help.gradle.org
18:50:26.884 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger]
18:50:26.884 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED in 22s
18:50:26.884 [LIFECYCLE] [org.gradle.internal.buildevents.BuildResultLogger] 25 actionable tasks: 4 executed, 21 up-to-date
18:50:26.885 [DEBUG] [org.gradle.internal.work.DefaultWorkerLeaseService] Worker lease root.1 completed (0 worker(s) in use)
18:50:26.885 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Daemon worker Thread 3: released lock on root.1
18:50:26.885 [DEBUG] [org.gradle.internal.progress.DefaultBuildOperationExecutor] Completing Build operation 'Run build'
18:50:26.887 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for file content cache (/Users/alexandru-claudiuantonica/Workspace/Tappter/tappter-app/platforms/android/.gradle/4.4/fileContent)
18:50:26.887 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on file content cache (/Users/alexandru-claudiuantonica/Workspace/Tappter/tappter-app/platforms/android/.gradle/4.4/fileContent).
18:50:26.888 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for Build Output Cleanup Cache (/Users/alexandru-claudiuantonica/Workspace/Tappter/tappter-app/platforms/android/.gradle/buildOutputCleanup)
18:50:26.888 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on Build Output Cleanup Cache (/Users/alexandru-claudiuantonica/Workspace/Tappter/tappter-app/platforms/android/.gradle/buildOutputCleanup).
18:50:26.889 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for task history cache (/Users/alexandru-claudiuantonica/Workspace/Tappter/tappter-app/platforms/android/.gradle/4.4/taskHistory)
18:50:26.889 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on task history cache (/Users/alexandru-claudiuantonica/Workspace/Tappter/tappter-app/platforms/android/.gradle/4.4/taskHistory).
18:50:26.890 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.CachedStoreFactory] Resolution result cache closed. Cache reads: 0, disk reads: 0 (avg: 0.0 secs, total: 0.0 secs)
18:50:26.890 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.CachedStoreFactory] Resolution result cache closed. Cache reads: 0, disk reads: 0 (avg: 0.0 secs, total: 0.0 secs)
18:50:26.891 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.ResolutionResultsStoreFactory] Deleted 4 resolution results binary files in 0.001 secs
18:50:26.894 [DEBUG] [org.gradle.deployment.internal.DefaultDeploymentRegistry] Stopping 0 deployment handles
18:50:26.894 [DEBUG] [org.gradle.deployment.internal.DefaultDeploymentRegistry] Stopped deployment handles
18:50:26.906 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for Artifact transforms cache (/Users/alexandru-claudiuantonica/.gradle/caches/transforms-1)
18:50:26.906 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on Artifact transforms cache (/Users/alexandru-claudiuantonica/.gradle/caches/transforms-1).
18:50:26.907 [DEBUG] [org.gradle.cache.internal.DefaultCacheAccess] Cache Generated Gradle JARs cache (/Users/alexandru-claudiuantonica/.gradle/caches/4.4/generated-gradle-jars) was closed 0 times.
18:50:26.908 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for file hash cache (/Users/alexandru-claudiuantonica/Workspace/Tappter/tappter-app/platforms/android/.gradle/4.4/fileHashes)
18:50:26.908 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache fileHashes.bin (/Users/alexandru-claudiuantonica/Workspace/Tappter/tappter-app/platforms/android/.gradle/4.4/fileHashes/fileHashes.bin)
18:50:26.910 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on file hash cache (/Users/alexandru-claudiuantonica/Workspace/Tappter/tappter-app/platforms/android/.gradle/4.4/fileHashes).
18:50:26.911 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for artifact cache (/Users/alexandru-claudiuantonica/.gradle/caches/modules-2)
18:50:26.911 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache module-artifact.bin (/Users/alexandru-claudiuantonica/.gradle/caches/modules-2/metadata-2.36/module-artifact.bin)
18:50:26.911 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache resource-at-url.bin (/Users/alexandru-claudiuantonica/.gradle/caches/modules-2/metadata-2.36/resource-at-url.bin)
18:50:26.911 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache module-artifacts.bin (/Users/alexandru-claudiuantonica/.gradle/caches/modules-2/metadata-2.36/module-artifacts.bin)
18:50:26.911 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache module-metadata.bin (/Users/alexandru-claudiuantonica/.gradle/caches/modules-2/metadata-2.36/module-metadata.bin)
18:50:26.912 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache module-versions.bin (/Users/alexandru-claudiuantonica/.gradle/caches/modules-2/metadata-2.36/module-versions.bin)
18:50:26.912 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on artifact cache (/Users/alexandru-claudiuantonica/.gradle/caches/modules-2).
18:50:26.913 [DEBUG] [org.gradle.launcher.daemon.server.exec.ExecuteBuild] The daemon has finished executing the build.
18:50:26.961 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientInputForwarder] Dispatching close input message: org.gradle.launcher.daemon.protocol.CloseInput@7caae411
18:50:27.183 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 13: dispatching class org.gradle.launcher.daemon.protocol.CloseInput
18:50:27.186 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClient] Received result Failure[value=org.gradle.initialization.ReportedException: org.gradle.internal.exceptions.LocationAwareException: Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.] from daemon DaemonInfo{pid=56367, address=[262c065e-43a9-4b8b-bf30-c3bec695f7e5 port:56215, addresses:[/0:0:0:0:0:0:0:1, /127.0.0.1]], state=Idle, lastBusy=1529084883576, context=DefaultDaemonContext[uid=d6aac102-4778-4fea-89a0-a613a51f6242,javaHome=/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home,daemonRegistryDir=/Users/alexandru-claudiuantonica/.gradle/daemon,pid=56367,idleTimeout=10800000,daemonOpts=-Xmx16384M,-Dfile.encoding=UTF-8,-Duser.country=GB,-Duser.language=en,-Duser.variant]} (build should be done).
18:50:27.186 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 1: dispatching class org.gradle.launcher.daemon.protocol.Finished
18:50:27.188 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 1: connection stop
Unable to apply changes on device: BPN7N18315016632. Error is: Command ./gradlew failed with exit code 1.

What could be wrong ?

This is the flow I tried few times and nothing :

  • remove platforms, hooks and node_modules folders
  • run tns platfom add android
  • run tns run android

#2

I updated the app.gradle file with this configuration

// Add your native dependencies here:

// Uncomment to add recyclerview-v7 dependency
dependencies {
//	compile 'com.android.support:recyclerview-v7:+'
  compile 'com.google.android.gms:play-services-gcm:15.0.1'
}

configurations.all {
    resolutionStrategy {
        force "com.google.android.gms:play-services-gcm:15.0.1"
        force "com.google.android.gms:play-services-location:15.0.1"
    }
    resolutionStrategy.eachDependency { details ->
        def requested = details.requested
        if (requested.group == 'com.android.support') {
            if (!requested.name.startsWith("multidex")) {
                details.useVersion '27.1.1'
            }
        }
    }
}

android {
    defaultConfig {
        generatedDensities = []
        applicationId = "com.tappter.pim"
        multiDexEnabled true
        manifestPlaceholders = [
                manifestApplicationId: "${applicationId}",
                onesignal_app_id : "***",
                onesignal_google_project_number: "***"
        ]
    }
    aaptOptions {
        additionalParameters "--no-version-vectors"
    }
}

repositories {
    maven { url 'https://maven.google.com' }
}

dependencies {
    compile 'com.onesignal:OneSignal:[3.6.2, 3.99.99]'
}

I don’t have the error about Multidex but the application doesn’t start (device & emulator).

Console output (device) :

Refreshing application...
Successfully synced application com.tappter.pim on device BPN7N18315016632.
ActivityManager: Start proc 8643:com.tappter.pim/u0a202 for activity com.tappter.pim/com.tns.NativeScriptActivity
ActivityManager: startProcess: name=com.tappter.pim app=ProcessRecord{703833e 8643:com.tappter.pim/u0a202} knownToBeDead=true thread=null pid=8643
ActivityManager: Attach thread to application:8643
ActivityManager: Process com.tappter.pim (pid 8643) has died: vis  +99TOP
ActivityManager: cleanUpApplicationRecord app: ProcessRecord{703833e 8643:com.tappter.pim/u0a202}, app.bad: false, restarting: false, allowRestart: true

Nativescript installed the application on the device but when it tried to refresh it, it didn’t work. When I try to open the app, it doesn’t work.


#3

same here. after upgrading to 4.1 cant open watch app in android emulator. but when i revert it back it works fine…


#4

Same. Except in my case, release builds don’t work, but debug works with a physical device. Same error.