I am trying to build a POC using Connect-SDK-Android. I followed the step mentioned here
https://github.com/ConnectSDK/Connect-SDK-Android-API-Sampler
After cloning I am able to run the project 'Connect-SDK-Android' in Android Studio without any error. Also I could not connect phone to wifi using this
enter image description here
when i try to run test project it fails with below error
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':testDebugUnitTest'.
> Could not resolve all task dependencies for configuration ':debugUnitTestRuntimeClasspath'.
> Could not resolve project :Connect-SDK-Android.
Required by:
project :
> Unable to find a matching configuration of project :Connect-SDK-Android:
- None of the consumable configurations have attributes.
* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Exception is:
org.gradle.api.internal.tasks.TaskDependencyResolveException: Could not determine the dependencies of task ':testDebugUnitTest'.
at org.gradle.api.internal.tasks.CachingTaskDependencyResolveContext.getDependencies(CachingTaskDependencyResolveContext.java:69)
at org.gradle.execution.plan.TaskDependencyResolver.resolveDependenciesFor(TaskDependencyResolver.java:46)
at org.gradle.execution.plan.LocalTaskNode.getDependencies(LocalTaskNode.java:161)
at org.gradle.execution.plan.LocalTaskNode.resolveDependencies(LocalTaskNode.java:129)
------------------- some content removed to reduce line -------------------org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:63)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:82)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:52)
at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:297)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
Any insights on this would be helpful.
As per suggestions received online i tried using below variations in build.gradle
//implementation project(':Connect-SDK-Android')
OR
//implementation 'com.github.ConnectSDK:Connect-SDK-Android:master-SNAPSHOT'
Related
Facing this error during runtime in flutter
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':cloud_firestore:extractDebugAnnotations'.
Could not resolve all files for configuration ':cloud_firestore:detachedConfiguration2'.
Could not download kotlin-compiler-30.1.2.jar (com.android.tools.external.com-intellij:kotlin-compiler:30.1.2)
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/external/com-intellij/kotlin-compiler/30.1.2/kotlin-compiler-30.1.2.jar'.
> Premature end of Content-Length delimited message body (expected: 39,870,124; received: 4,456,416)
Could not download groovy-3.0.8.jar (org.codehaus.groovy:groovy:3.0.8)
> Could not get resource 'https://repo.maven.apache.org/maven2/org/codehaus/groovy/groovy/3.0.8/groovy-3.0.8.jar'.
> Could not GET 'https://repo.maven.apache.org/maven2/org/codehaus/groovy/groovy/3.0.8/groovy-3.0.8.jar'.
> Read timed out
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 14m 46s
I installed image_picker after that I get error message when i start app
this is error log
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:mergeDebugJavaResource'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> File 'com.android.builder.files.ZipCentralDirectory#40b49de9' was deleted, but previous version not found in cache
* 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.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:mergeDebugNativeLibs'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> File 'com.android.builder.files.ZipCentralDirectory#5bca7644' was deleted, but previous version not found in cache
* 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
Exception: Gradle task assembleDebug failed with exit code 1
what is this problem??
how can i solve this ~?
The error happened when you were installing it
So first check the steps again :
https://pub.dev/packages/image_picker
If not work, try to recover AndroidManifest.xml again and follow the instructions
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:mergeDebugResources'.
Could not resolve all files for configuration ':app:_internal_aapt2_binary'.
Failed to transform artifact 'aapt2-windows.jar (com.android.tools.build:aapt2:3.5.0-5435860)' to match attributes {artifactType=_internal-android-aapt2-binary, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
Execution failed for Aapt2Extractor: C:\Users\User.gradle\caches\modules-2\files-2.1\com.android.tools.build\aapt2\3.5.0-5435860\e8565f11a238b905299000292dded060de0317ea\aapt2-3.5.0-5435860-windows.jar.
java.io.FileNotFoundException: File does not exist: C:\Users\User.gradle\caches\transforms-2\files-2.1\c5a4a6d176b090b56aa3954ad04c2af5\aapt2-3.5.0-5435860-windows
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
I have a flutter application am suppose to make little changes on, but the flutter is not running on my system, its showing many errors
Error running Gradle:
ProcessException: Process "/home/benny/Documents/Afiaanyi/clon/mobile_app_codes/android/gradlew" exited abnormally:
Starting a Gradle Daemon (subsequent builds will be faster)
Configure project :app
Observed package id 'system-images;android-26;google_apis;x86' in inconsistent location '/home/benny/Android/Sdk/system-images/android-27/google_apis/x86' (Expected '/home/benny/Android/Sdk/system-images/android-26/google_apis/x86')
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
Configure project :connectivity
Project evaluation failed including an error in afterEvaluate {}. Run with --stacktrace for details of the afterEvaluate {} error.
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring project ':connectivity'.
Could not resolve all artifacts for configuration ':connectivity:classpath'.
Could not download kotlin-stdlib-jdk7.jar (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.11)
Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.3.11/kotlin-stdlib-jdk7-1.3.11.jar'.
Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.3.11/kotlin-stdlib-jdk7-1.3.11.jar'. Received status code 504 from server: Gateway Time-out
Could not download kotlin-stdlib.jar (org.jetbrains.kotlin:kotlin-stdlib:1.3.11)
Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib/1.3.11/kotlin-stdlib-1.3.11.jar'.
Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib/1.3.11/kotlin-stdlib-1.3.11.jar'. Received status code 502 from server: Bad Gateway
Could not download jsr305.jar (com.google.code.findbugs:jsr305:3.0.2)
Could not get resource 'https://jcenter.bintray.com/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar'.
Could not GET 'https://jcenter.bintray.com/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar'.
Remote host closed connection during handshake
Could not download checker-qual.jar (org.checkerframework:checker-qual:2.5.2)
Could not get resource 'https://jcenter.bintray.com/org/checkerframework/checker-qual/2.5.2/checker-qual-2.5.2.jar'.
Could not GET 'https://jcenter.bintray.com/org/checkerframework/checker-qual/2.5.2/checker-qual-2.5.2.jar'. Received status code 502 from server: Bad Gateway
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 8m 46s
Command: /home/benny/Documents/Afiaanyi/clone/mobile_app_codes/android/gradlew app:properties
Pls how can i debug this one step by step to fix all errors
Thanks for stopping to help
Are you in Europe? We had the same for the most of the day since noon.
Here is their Incident Report for today's issue:
https://status.bintray.com/incidents/nmtzpzv59hsd
when i am using ngCordova facebook and pushNotification plugins in same app and build the app then find the following error.
========================================================================
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Landroid/support/annotation/AnimRes;
at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:502)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
at com.android.dx.command.dexer.Main.run(Main.java:277)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)
FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':dexDebug'.
com.android.ide.common.internal.LoggedErrorException: Failed to run command:
/opt/android-sdk-linux/build-tools/23.0.1/dx --dex --no-optimize --output /home/anurag/my-works/fbPush/platforms/android/build/intermediates/dex/debug --input-list=/home/anurag/my-works/fbPush/platforms/android/build/intermediates/tmp/dex/debug/inputList.txt
Error Code:
2
Output:
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Landroid/support/annotation/AnimRes;
at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:502)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
at com.android.dx.command.dexer.Main.run(Main.java:277)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 38.579 secs
/home/anurag/my-works/fbPush/platforms/android/cordova/node_modules/q/q.js:126
throw e;
^
Error code 1 for command: /home/anurag/my-works/fbPush/platforms/android/gradlew with args: cdvBuildDebug,-b,/home/anurag/my-works/fbPush/platforms/android/build.gradle,-Dorg.gradle.daemon=true
I had the same issue on my app and i solved it by removing my cordova facebook plugin and adding this one : https://github.com/jeduan/cordova-plugin-facebook4
My push notification plugin is : phonegap-plugin-push