Fio
Fio

Reputation: 40

VS 2015 Cordova/Admob-Pro Build Error

I have struggled with this issue for too many hours. With AdMob-Pro installed in my Cordova app, I cannot get a successful clean or build. AdMob-Pro was last installed using a local repository. The dependency cordova-plugin-extension is installed. The diagnostic output is below.

I have no clue what the MDA task error refers to; where does one configure output directories? The bin does contain the debug folder anyhow.

And I cannot find anything in the AdMob-Pro installation instructions that refer to google dependencies referred to by the build output.

Without this plugin, my project builds and runs in emulator and on device. Can someone please explain to me what's going wrong here?

Thanks!

>------ Rebuild All started: Project: projectname, Configuration: Debug Android ------
>Build started 5/24/2016 12:54:29 PM.
>     
>
>Building with tools version "14.0".
>     
>
>Target "_CheckForInvalidConfigurationAndPlatform" in file "C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets" from project "C:\Users\username\Documents\Visual Studio 2015\Projects\projectname\projectname\projectname.jsproj" (entry point):
>       Set Property: _InvalidConfigurationMessageText=The OutputPath property is not set for project 'projectname.jsproj'.  Please check to make sure that you have specified a valid combination of Configuration and Platform for this project.  Configuration='Debug'  Platform='Android'.
>       Set Property: _InvalidConfigurationMessageText=The OutputPath property is not set for project 'projectname.jsproj'.  Please check to make sure that you have specified a valid combination of Configuration and Platform for this project.  Configuration='Debug'  Platform='Android'.  This error may also appear if some other project is trying to follow a project-to-project reference to this project, this project has been unloaded or is not included in the solution, and the referencing project does not build using the same or an equivalent Configuration or Platform.
>       Task "Error" skipped, due to false condition; ( '$(_InvalidConfigurationError)' == 'true' ) was evaluated as ( '' == 'true' ).
>       Task "Warning" skipped, due to false condition; ( '$(_InvalidConfigurationWarning)' == 'true' ) was evaluated as ( '' == 'true' ).
>       Using "Message" task from assembly "Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
>       Task "Message"
>         Task Parameter:Text=Configuration=Debug
>         Task Parameter:Importance=Low
>         Configuration=Debug
>       Done executing task "Message".
>       Task "Message"
>         Task Parameter:Text=Platform=Android
>         Task Parameter:Importance=Low
>         Platform=Android
>       Done executing task "Message".
>       Task "Error" skipped, due to false condition; ('$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)')) was evaluated as ('bin\Android\Debug\' != '' and !HasTrailingSlash('bin\Android\Debug\')).
>       Task "Error" skipped, due to false condition; ('$(BaseIntermediateOutputPath)' != '' and !HasTrailingSlash('$(BaseIntermediateOutputPath)')) was evaluated as ('bld\' != '' and !HasTrailingSlash('bld\')).
>       Task "Error" skipped, due to false condition; ('$(IntermediateOutputPath)' != '' and !HasTrailingSlash('$(IntermediateOutputPath)')) was evaluated as ('bld\Android\Debug\' != '' and !HasTrailingSlash('bld\Android\Debug\')).
>     
>
>Done building target "_CheckForInvalidConfigurationAndPlatform" in project "projectname.jsproj".
>     
>
>Target "_BeforeBeforeRebuild" in file "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\AppxPackage\Microsoft.AppXPackage.Targets" from project "C:\Users\username\Documents\Visual Studio 2015\Projects\projectname\projectname\projectname.jsproj" (target "BeforeRebuild" depends on it):
>       Set Property: _Rebuilding=true
>        
>
>Done building target "_BeforeBeforeRebuild" in project "projectname.jsproj".
>     
>
>Target "BeforeRebuild" in file "C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets" from project "C:\Users\username\Documents\Visual Studio 2015\Projects\projectname\projectname\projectname.jsproj" (target "Rebuild" depends on it):
>     
>
>Done building target "BeforeRebuild" in project "projectname.jsproj".
>     
>
>Target "BeforeClean" in file "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\ApacheCordovaTools\vs-mda-targets\Microsoft.MDA.FileMirroring.targets" from project "C:\Users\username\Documents\Visual Studio 2015\Projects\projectname\projectname\projectname.jsproj" (target "Clean" depends on it):
>       Using "CallTarget" task from assembly "Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
>       Task "CallTarget"
>         Task Parameter:Targets=CleanCordovaDeploy
>     
>
>Target "CleanCordovaDeploy" in file "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\ApacheCordovaTools\vs-mda-targets\Microsoft.MDA.FileMirroring.targets" from project "C:\Users\username\Documents\Visual Studio 2015\Projects\projectname\projectname\projectname.jsproj" (target "BeforeClean" depends on it):
>       Added Item(s): CordovaDeployDirs=C:\Users\username\Documents\Visual Studio 2015\Projects\projectname\projectname\\platforms\wp8\cordova\lib\CordovaDeploy\CordovaDeploy\bin
>       Using "RemoveDir" task from assembly "Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
>       Task "RemoveDir"
>         Task Parameter:Directories=C:\Users\username\Documents\Visual Studio 2015\Projects\projectname\projectname\\platforms\wp8\cordova\lib\CordovaDeploy\CordovaDeploy\bin
>         Directory "C:\Users\username\Documents\Visual Studio 2015\Projects\projectname\projectname\\platforms\wp8\cordova\lib\CordovaDeploy\CordovaDeploy\bin" doesn't exist. Skipping.
>         Output Item(s):
>             DeletedDirectories=
>                 C:\Users\username\Documents\Visual Studio 2015\Projects\projectname\projectname\\platforms\wp8\cordova\lib\CordovaDeploy\CordovaDeploy\bin
>                         OriginalItemSpec=C:\Users\username\Documents\Visual Studio 2015\Projects\projectname\projectname\\platforms\wp8\cordova\lib\CordovaDeploy\CordovaDeploy\bin
>       Done executing task "RemoveDir".
>       Task "MdaError" skipped, due to false condition; (@(CordovaDeployDirs) != @(DeletedDirectories)) was evaluated as (C:\Users\username\Documents\Visual Studio 2015\Projects\projectname\projectname\\platforms\wp8\cordova\lib\CordovaDeploy\CordovaDeploy\bin != C:\Users\username\Documents\Visual Studio 2015\Projects\projectname\projectname\\platforms\wp8\cordova\lib\CordovaDeploy\CordovaDeploy\bin).
>     
>
>Done building target "CleanCordovaDeploy" in project "projectname.jsproj".
>       Done executing task "CallTarget".
>       Using "Exec" task from assembly "Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
>       Task "Exec"
>         Task Parameter:StdErrEncoding=utf-8
>         Task Parameter:StdOutEncoding=utf-8
>         Task Parameter:Command=platforms\android\cordova\clean.bat
>         platforms\android\cordova\clean.bat
>         ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk
>         JAVA_HOME=C:\Program Files (x86)\Java\jdk1.7.0_55
>         null
>         org.xwalk:xwalk_core_library_beta:18+
>
>         FAILURE: Build failed with an exception.
>
>         * What went wrong:
>         A problem occurred configuring root project 'android'.
>         > Could not resolve all dependencies for configuration ':_armv7DebugCompile'.
>            > Could not find any version that matches com.google.android.gms:play-services-ads:+.
>              Searched in the following locations:
>                  https://repo1.maven.org/maven2/com/google/android/gms/play-services-ads/maven-metadata.xml
>                  https://repo1.maven.org/maven2/com/google/android/gms/play-services-ads/
>                  https://download.01.org/crosswalk/releases/crosswalk/android/maven2/com/google/android/gms/play-services-ads/maven-metadata.xml
>                  https://download.01.org/crosswalk/releases/crosswalk/android/maven2/com/google/android/gms/play-services-ads/
>                  file:/C:/Program Files (x86)/Android/android-sdk/extras/android/m2repository/com/google/android/gms/play-services-ads/maven-metadata.xml
>                  file:/C:/Program Files (x86)/Android/android-sdk/extras/android/m2repository/com/google/android/gms/play-services-ads/
>              Required by:
>                  :android:unspecified
>
>         * 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: 3.472 secs
>         Picked up _JAVA_OPTIONS: -Xmx512M
>     
>
>EXEC : error : cmd: Command failed with exit code 1
>             at ChildProcess.whenDone (C:\Users\username\Documents\Visual Studio 2015\Projects\projectname\projectname\platforms\android\cordova\node_modules\cordova-common\src\superspawn.js:169:23)
>             at ChildProcess.emit (events.js:110:17)
>             at maybeClose (child_process.js:1016:16)
>             at Process.ChildProcess._handle.onexit (child_process.js:1088:5)
>     
>
>C:\Program Files 
>    (x86)\MSBuild\Microsoft\VisualStudio\v14.0\ApacheCordovaTools\vs-mda-targets\Microsoft.MDA.FileMirroring.targets(349,5): error MSB3073: The command "platforms\android\cordova\clean.bat" exited with code 2.
>       Done executing task "Exec" -- FAILED.
>     
>
>Done building target "BeforeClean" in project "projectname.jsproj" -- FAILED.
>
>Build FAILED.
>
>Time Elapsed 00:00:05.66
>========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

Upvotes: 0

Views: 504

Answers (1)

Fio
Fio

Reputation: 40

Yes, there were several items of the SDK that the plugin required which had not been checked selected and installed. the details are found at the link to the plugin wiki:

https://github.com/floatinghotpot/cordova-admob-pro/wiki/Difference-of-Plugin-IDs

When the SDK install was updated, cleaned VS Cordova cache, restarted and rebuilt, all was well.

Upvotes: 1

Related Questions