+ Start a Discussion
Jennifer W. LeeJennifer W. Lee 

Need help with Mobile SDK trailhead on building hybrid_remote app challenge

When I run the command cordova build, I am getting an error. I added the versions to the manifest.xml file but that didn't see to have done anything. Can someone assist?

Microsoft Windows [Version 6.3.9600] (c) 2013 Microsoft Corporation. All rights reserved.

C:\Windows\System32>CD c:\users\jenwlee\AndroidApps\TrailheadHybridTest

c:\Users\jenwlee\AndroidApps\TrailheadHybridTest>cordova prepare

c:\Users\jenwlee\AndroidApps\TrailheadHybridTest>cordova build Running command: cmd "/s /c "c:\Users\jenwlee\AndroidApps\TrailheadHybridTest\pl atforms\android\cordova\build.bat"" ANDROID_HOME=C:\Users\jenwlee\AppData\Local\Android\sdk JAVA_HOME=C:\Program Files\Java\jdk8 Running: c:\Users\jenwlee\AndroidApps\TrailheadHybridTest\platforms\android\grad lew cdvBuildDebug -b c:\Users\jenwlee\AndroidApps\TrailheadHybridTest\platforms\ android\build.gradle -Dorg.gradle.daemon=true :preBuild :compileDebugNdk UP-TO-DATE :preDebugBuild :checkDebugManifest :CordovaLib:compileLint :CordovaLib:copyDebugLint UP-TO-DATE :CordovaLib:mergeDebugProguardFiles UP-TO-DATE :CordovaLib:preBuild :CordovaLib:preDebugBuild :CordovaLib:checkDebugManifest :CordovaLib:prepareDebugDependencies :CordovaLib:compileDebugAidl UP-TO-DATE :CordovaLib:compileDebugRenderscript UP-TO-DATE :CordovaLib:generateDebugBuildConfig UP-TO-DATE :CordovaLib:generateDebugAssets UP-TO-DATE :CordovaLib:mergeDebugAssets UP-TO-DATE :CordovaLib:generateDebugResValues UP-TO-DATE :CordovaLib:generateDebugResources UP-TO-DATE :CordovaLib:packageDebugResources UP-TO-DATE :CordovaLib:processDebugManifest UP-TO-DATE :CordovaLib:processDebugResources UP-TO-DATE :CordovaLib:generateDebugSources UP-TO-DATE :CordovaLib:compileDebugJava UP-TO-DATE :CordovaLib:processDebugJavaRes UP-TO-DATE :CordovaLib:packageDebugJar UP-TO-DATE :CordovaLib:compileDebugNdk UP-TO-DATE :CordovaLib:packageDebugJniLibs UP-TO-DATE :CordovaLib:packageDebugLocalJar UP-TO-DATE :CordovaLib:packageDebugRenderscript UP-TO-DATE :CordovaLib:bundleDebug UP-TO-DATE :prepareAndroidCordovaLibUnspecifiedDebugLibrary UP-TO-DATE :prepareDebugDependencies :compileDebugAidl UP-TO-DATE :compileDebugRenderscript UP-TO-DATE :generateDebugBuildConfig UP-TO-DATE :generateDebugAssets UP-TO-DATE :mergeDebugAssets UP-TO-DATE :generateDebugResValues UP-TO-DATE :generateDebugResources UP-TO-DATE :mergeDebugResources UP-TO-DATE :processDebugManifest C:\Users\jenwlee\AndroidApps\TrailheadHybridTest\platforms\android\AndroidManife st.xml:25:9 Error: Element activity#com.plugin.gcm.PushHandlerActivity at AndroidManifest.x ml:25:9 duplicated with element declared at AndroidManifest.xml:10:9 C:\Users\jenwlee\AndroidApps\TrailheadHybridTest\platforms\android\AndroidManife st.xml:0:0 Error: Validation failed, exiting :processDebugManifest FAILED

FAILURE: Build failed with an exception.

What went wrong: Execution failed for task ':processDebugManifest'.

Manifest merger failed with multiple errors, see logs

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: 16.419 secs

c:\Users\jenwlee\AndroidApps\TrailheadHybridTest\platforms\android\cordova\node_ modules\q\q.js:126 throw e; ^ Error code 1 for command: cmd with args: /s /c "c:\Users\jenwlee\AndroidApps\Tra ilheadHybridTest\platforms\android\gradlew cdvBuildDebug -b c:\Users\jenwlee\And roidApps\TrailheadHybridTest\platforms\android\build.gradle -Dorg.gradle.daemon= true" ERROR building one of the platforms: Error: cmd: Command failed with exit code 1

You may not have the required environment or OS to build this project Error: cmd: Command failed with exit code 1 at ChildProcess.whenDone (C:\Users\jenwlee\AppData\Roaming\npm\node_modules\ cordova\node_modules\cordova-lib\src\cordova\superspawn.js:134:23) at ChildProcess.emit (events.js:110:17) at maybeClose (child_process.js:1015:16) at Process.ChildProcess._handle.onexit (child_process.js:1087:5)

c:\Users\jenwlee\AndroidApps\TrailheadHybridTest>
NagaNaga (Salesforce Developers) 
Hi Jennifer,

I think gradle assemble  Manifests have different SDK Versions and cannot be merged.

You need  to edit my Manifests and build.gradle file

Please check the link below

http://stackoverflow.com/questions/17587751/gradle-execution-failed-for-task-processdebugmanifest

Best Regards
Naga Kiran
Jennifer W. LeeJennifer W. Lee
Thanks, Naga.

I eventually came to the same resolution. I can fix this in Eclipse for the app I created, but where do I go to change this as the root so when I run Corvoda to build it, it takes the manifest and build.gradle file from there?