Build failed apk with AdMobPro - ionic2

i detect the problem is with AdMobPro plugin
cordova plugin add https://github.com/floatinghotpot/cordova-admob-pro
cordova build android
stacktrace
cordova build android
ANDROID_HOME=C:\Users\Yassine\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_102 Subproject Path:
CordovaLib The Task.leftShift(Closure) method has been deprecated and
is scheduled to be removed in Gradle 5.0. Please use
Task.doLast(Action) instead.
at build_axxz9tj19izrj5q0qkz0lbpfl.run(F:\test1\platforms\android\build.gradle:137)
The JavaCompile.setDependencyCacheDir() method has been deprecated and
is scheduled to be removed in Gradle 4.0. Incremental java compilation
is an incubating feature. The TaskInputs.source(Object) method has
been deprecated and is scheduled to be removed in Gradle 4.0. Please
use TaskInputs.file(Object).skipWhenEmpty() instead. :preBuild
UP-TO-DATE :preDebugBuild UP-TO-DATE :checkDebugManifest
:preReleaseBuild UP-TO-DATE :CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE :CordovaLib:checkDebugManifest
:CordovaLib:prepareDebugDependencies :CordovaLib:compileDebugAidl
:CordovaLib:compileDebugNdk UP-TO-DATE :CordovaLib:compileLint
:CordovaLib:copyDebugLint UP-TO-DATE :CordovaLib:mergeDebugShaders
:CordovaLib:compileDebugShaders :CordovaLib:generateDebugAssets
:CordovaLib:mergeDebugAssets :CordovaLib:mergeDebugProguardFiles
UP-TO-DATE :CordovaLib:packageDebugRenderscript UP-TO-DATE
:CordovaLib:compileDebugRenderscript
:CordovaLib:generateDebugResValues :CordovaLib:generateDebugResources
:CordovaLib:packageDebugResources :CordovaLib:processDebugManifest
:CordovaLib:generateDebugBuildConfig :CordovaLib:processDebugResources
:CordovaLib:generateDebugSources
:CordovaLib:incrementalDebugJavaCompilationSafeguard
:CordovaLib:compileDebugJavaWithJavac
:CordovaLib:compileDebugJavaWithJavac - is not incremental (e.g.
outputs have changed, no previous execution, etc.). Note: Some input
files use or override a deprecated API. Note: Recompile with
-Xlint:deprecation for details. :CordovaLib:processDebugJavaRes UP-TO-DATE :CordovaLib:transformResourcesWithMergeJavaResForDebug
:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug
:CordovaLib:mergeDebugJniLibFolders
:CordovaLib:transformNative_libsWithMergeJniLibsForDebug
:CordovaLib:transformNative_libsWithSyncJniLibsForDebug
:CordovaLib:bundleDebug :CordovaLib:preReleaseBuild UP-TO-DATE
:CordovaLib:checkReleaseManifest
:CordovaLib:prepareReleaseDependencies :CordovaLib:compileReleaseAidl
:CordovaLib:compileReleaseNdk UP-TO-DATE :CordovaLib:copyReleaseLint
UP-TO-DATE :CordovaLib:mergeReleaseShaders
:CordovaLib:compileReleaseShaders :CordovaLib:generateReleaseAssets
:CordovaLib:mergeReleaseAssets :CordovaLib:mergeReleaseProguardFiles
UP-TO-DATE :CordovaLib:packageReleaseRenderscript UP-TO-DATE
:CordovaLib:compileReleaseRenderscript
:CordovaLib:generateReleaseResValues
:CordovaLib:generateReleaseResources
:CordovaLib:packageReleaseResources :CordovaLib:processReleaseManifest
:CordovaLib:generateReleaseBuildConfig
:CordovaLib:processReleaseResources :CordovaLib:generateReleaseSources
:CordovaLib:incrementalReleaseJavaCompilationSafeguard
:CordovaLib:compileReleaseJavaWithJavac
:CordovaLib:compileReleaseJavaWithJavac - is not incremental (e.g.
outputs have changed, no previous execution, etc.). Note: Some input
files use or override a deprecated API. Note: Recompile with
-Xlint:deprecation for details. :CordovaLib:processReleaseJavaRes UP-TO-DATE :CordovaLib:transformResourcesWithMergeJavaResForRelease
:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForRelease
:CordovaLib:mergeReleaseJniLibFolders
:CordovaLib:transformNative_libsWithMergeJniLibsForRelease
:CordovaLib:transformNative_libsWithSyncJniLibsForRelease
:CordovaLib:bundleRelease
:prepareComAndroidSupportSupportCompat2520Library
:prepareComAndroidSupportSupportCoreUi2520Library
:prepareComAndroidSupportSupportCoreUtils2520Library
:prepareComAndroidSupportSupportFragment2520Library
:prepareComAndroidSupportSupportMediaCompat2520Library
:prepareComAndroidSupportSupportV42520Library
:prepareComGoogleAndroidGmsPlayServicesAds1104Library
:prepareComGoogleAndroidGmsPlayServicesAdsLite1104Library
:prepareComGoogleAndroidGmsPlayServicesBase1104Library
:prepareComGoogleAndroidGmsPlayServicesBasement1104Library
:prepareComGoogleAndroidGmsPlayServicesClearcut1104Library
:prepareComGoogleAndroidGmsPlayServicesGass1104Library
:prepareComGoogleAndroidGmsPlayServicesSafetynet1104Library
:prepareComGoogleAndroidGmsPlayServicesTasks1104Library
:prepareOrgApacheCordovaCordovaLib623DebugLibrary
:prepareDebugDependencies :compileDebugAidl :compileDebugRenderscript
:generateDebugBuildConfig :generateDebugResValues
:generateDebugResources :mergeDebugResources Error: Failed to crunch
file
F:\test1\platforms\android\build\intermediates\exploded-aar\com.google.android.gms\play-services-base\11.0.4\res\drawable-xxhdpi-v4\common_google_signin_btn_icon_light_normal_background.9.png into
F:\test1\platforms\android\build\intermediates\res\merged\debug\drawable-xxhdpi-v4\common_google_signin_btn_icon_light_normal_background.9.png :mergeDebugResources FAILED
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':mergeDebugResources'.
Error: Failed to crunch file F:\test1\platforms\android\build\intermediates\exploded-aar\com.google.android.gms\play-services-base\11.0.4\res\drawable-xxhdpi-v4\common_google_signin_btn_icon_light_normal_background.9.png into
F:\test1\platforms\android\build\intermediates\res\merged\debug\drawable-xxhdpi-v4\common_google_signin_btn_icon_light_normal_background.9.png
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: 21.484 secs Error: cmd: 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 or override a deprecated API. Note: Recompile with
-Xlint:deprecation for details.
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':mergeDebugResources'.
Error: Failed to crunch file F:\test1\platforms\android\build\intermediates\exploded-aar\com.google.android.gms\play-services-base\11.0.4\res\drawable-xxhdpi-v4\common_google_signin_btn_icon_light_normal_background.9.png into
F:\test1\platforms\android\build\intermediates\res\merged\debug\drawable-xxhdpi-v4\common_google_signin_btn_icon_light_normal_background.9.png
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
if i remove this plugin admobpro and build it is work

Related

Gradle and Cmake failing to find cpp file that is definitely there

I run gradle to build an android .aar and it reports that it can't find a file, but the file definitely is there.
$ ./gradlew.bat assembleRelease
> Task :webrtc-native:externalNativeBuildRelease FAILED
Build mrwebrtc arm64-v8a
ninja: error: 'C:/Developer/Microsoft-MRWebRTC/libs/mrwebrtc/src/interop/data_channel_interop.cpp', needed by 'CMakeFiles/mrwebrtc.dir/C_/Developer/Microsoft-MRWebRTC/libs/mrwebrtc/src/interop/data_channel_interop.cpp.o', missing and no known rule to make it
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':webrtc-native:externalNativeBuildRelease'.
> Build command failed.
Error while executing process C:\Users\User\AppData\Local\Android\Sdk\cmake\3.10.2.4988404\bin\cmake.exe with arguments {--build C:\Developer\Microsoft-MRWebRTC\tools\build\android\webrtc-native\.externalNativeBuild\cmake\release\arm64-v8a --target mrwebrtc}
ninja: error: 'C:/Developer/Microsoft-MRWebRTC/libs/mrwebrtc/src/interop/data_channel_interop.cpp', needed by 'CMakeFiles/mrwebrtc.dir/C_/Developer/Microsoft-MRWebRTC/libs/mrwebrtc/src/interop/data_channel_interop.cpp.o', missing and no known rule to make it
But the file C:/Developer/Microsoft-MRWebRTC/libs/mrwebrtc/src/interop/data_channel_interop.cpp is definitely there.
$ cd C:/Developer/Microsoft-MRWebRTC/libs/mrwebrtc/src/interop/
User MSYS /c/Developer/Microsoft-MRWebRTC/libs/mrwebrtc/src/interop (master)
$ ls
data_channel_interop.cpp global_factory.cpp interop_api.cpp local_video_track_interop.cpp remote_audio_track_interop.cpp transceiver_interop.cpp
external_video_track_source_interop.cpp global_factory.h local_audio_track_interop.cpp peer_connection_interop.cpp remote_video_track_interop.cpp
Could anyone help? I am kind of running out of ideas on this.
I discovered it was because I had 'caseSensitive' flags enabled on some of my directories. Be careful, this is a new feature of WSL2 and there are some peculiarities where you may be enabled in without realizing. Windows cmake cannot traverse directories that have this flag enabled on them.
Read about it here:
https://devblogs.microsoft.com/commandline/per-directory-case-sensitivity-and-wsl/

ERROR: Invalid options syntax: -//tensorflow:libtensorflow_cc.so

I am attempting to get TensorFlow working in C++ for the first time by following the instructions on => this page.
In PowerShell I executed
.\build.ps1 -//tensorflow:libtensorflow_cc.so -BuildCppAPI
but during the execution I get the following:
ERROR: Invalid options syntax: -//tensorflow:libtensorflow_cc.so
I have no idea what this means - and I don't even know what system is printing out the error or what action is failing. Below is the last part of what I see in the PowerShell window.
You have bazel 0.20.0 installed.
Do you wish to build TensorFlow with XLA JIT support? [y/N]: n
No XLA JIT support will be enabled for TensorFlow.
Do you wish to build TensorFlow with ROCm support? [y/N]: n
No ROCm support will be enabled for TensorFlow.
Do you wish to build TensorFlow with CUDA support? [y/N]: n
No CUDA support will be enabled for TensorFlow.
Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is /arch:AVX]:
Would you like to override eigen strong inline for some C++ compilation to reduce the compilation time? [Y/n]: n
Not overriding eigen strong inline, some compilations could take more than 20 mins.
Preconfigured Bazel build configs. You can use any of the below by adding "--config=<>" to your build command. See .bazelrc for more details.
--config=mkl # Build with MKL support.
--config=monolithic # Config for mostly static monolithic build.
--config=gdr # Build with GDR support.
--config=verbs # Build with libverbs support.
--config=ngraph # Build with Intel nGraph support.
--config=dynamic_kernels # (Experimental) Build kernels into separate shared objects.
Preconfigured Bazel build configs to DISABLE default on features:
--config=noaws # Disable AWS S3 filesystem support.
--config=nogcp # Disable GCP support.
--config=nohdfs # Disable HDFS support.
--config=noignite # Disable Apacha Ignite support.
--config=nokafka # Disable Apache Kafka support.
--config=nonccl # Disable NVIDIA NCCL support.
WARNING: The following rc files are no longer being read, please transfer their contents or import their path into one of the standard rc files:
c:\tf_windows_build\tensorflow-windows-build-script-master\source/.bazelrc
Starting local Bazel server and connecting to it...
ERROR: Invalid options syntax: -//tensorflow:libtensorflow_cc.so
INFO: Invocation ID: 8f02ecb6-9ff4-429a-841d-500d4246669f
WARNING: The following rc files are no longer being read, please transfer their contents or import their path into one of the standard rc files:
c:\tf_windows_build\tensorflow-windows-build-script-master\source/.bazelrc
INFO: Invocation ID: 5fd16822-1851-41f6-ac48-fdda432096f5
ERROR: Invalid options syntax: -//tensorflow:libtensorflow_cc.so
I have no idea what this means
It literally means exactly what it says: you used invalid options syntax.
Turns out, you slightly misread the instructions. The command format is:
.\build.ps1 -BazelBuildParameters <parameter_string> [optional_parameters]
You took out the text "BazelBuildParameters" so you're instead doing this:
.\build.ps1 -<parameter_string> [optional_parameters]
and the computer has no idea what to do with it.
I reckon you wanted something like this:
.\build.ps1 -BazelBuildParameters //tensorflow:libtensorflow_cc.so -BuildCppAPI

Ionic 3 after install admob plugin app build failed

When i build a android app in ionic 3 it was build. but after using admobFree or admobPro plugin every time build failed and i get this error....
(Due to post limit i am posting last few lines of error)
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 3m 22s
38 actionable tasks: 12 executed, 26 up-to-date
(node:11476) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: cmd: 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.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 3m 22s
[OK] Your app has been deployed.
Did you know you can live-reload changes from your app with --livereload?
C:\Users\SHEKH RAIES\Raies-Ionic\test\file-upload\upload>
I am late. but hope this might help developers searching for an answer. I have gone through a lot to fix this issue. documentation didn't help. changing the configuration didn't do anything. removing and readding platform didn't help. etc
Here is how I fixed this.
open file
project-folder/plugins/cordova-admob-sdk/plugin.xml
check this part
<platform name="android">
<preference name="PLAY_SERVICES_VERSION" default="11.0"/>
<framework src="com.google.android.gms:play-services-base:$PLAY_SERVICES_VERSION" />
<framework src="com.google.android.gms:play-services-ads:$PLAY_SERVICES_VERSION" />
</platform>
see file project-folder/platforms/android/build.gradle ( this file changes each time when project is build)
this dependencies part
dependencies {
implementation fileTree(dir: 'libs', include: '*.jar')
// SUB-PROJECT DEPENDENCIES START
implementation(project(path: "CordovaLib"))
compile "com.android.support:appcompat-v7:23+"
compile "com.google.android.gms:play-services-base:11.0"
compile "com.google.android.gms:play-services-ads:11.0"
compile "com.google.android.gms:play-services-analytics:+"
compile "com.android.support:support-v4:27.+"
// SUB-PROJECT DEPENDENCIES END
}
see another file project-folder/platforms/android/project.properties
target=android-26
android.library.reference.1=CordovaLib
cordova.system.library.1=com.android.support:appcompat-v7:23+
cordova.gradle.include.1=com.synconset.imagepicker/odi-ignorelinterrors.gradle
cordova.gradle.include.2=com.synconset.imagepicker/odi-androidtarget.gradle
cordova.system.library.2=com.google.android.gms:play-services-base:11.0
cordova.system.library.3=com.google.android.gms:play-services-ads:11.0
cordova.system.library.4=com.google.android.gms:play-services-analytics:+
cordova.gradle.include.3=phonegap-plugin-barcodescanner/odi-barcodescanner.gradle
cordova.system.library.5=com.android.support:support-v4:27.+
How i fixed
1 - changed file
project-folder/plugins/cordova-admob-sdk/plugin.xml
from 11.0 to + so it would look like this
<platform name="android">
<preference name="PLAY_SERVICES_VERSION" default="+"/>
<framework src="com.google.android.gms:play-services-base:$PLAY_SERVICES_VERSION" />
<framework src="com.google.android.gms:play-services-ads:$PLAY_SERVICES_VERSION" />
</platform>
2 - build (sudo ionic cordova build android)
that's it.
After building see file project-folder/platforms/android/build.gradle
the dependencies part. looks like this
dependencies {
implementation fileTree(dir: 'libs', include: '*.jar')
// SUB-PROJECT DEPENDENCIES START
implementation(project(path: "CordovaLib"))
compile "com.android.support:appcompat-v7:23+"
compile "com.google.android.gms:play-services-base:11.0"
compile "com.google.android.gms:play-services-ads:11.0"
compile "com.google.android.gms:play-services-analytics:+"
compile "com.android.support:support-v4:27.+"
// SUB-PROJECT DEPENDENCIES END
}
and project-folder/platforms/android/project.properties looks like this
target=android-26
android.library.reference.1=CordovaLib
cordova.system.library.1=com.android.support:appcompat-v7:23+
cordova.gradle.include.1=com.synconset.imagepicker/odi-ignorelinterrors.gradle
cordova.gradle.include.2=com.synconset.imagepicker/odi-androidtarget.gradle
cordova.system.library.2=com.google.android.gms:play-services-base:+
cordova.system.library.3=com.google.android.gms:play-services-ads:+
cordova.system.library.4=com.google.android.gms:play-services-analytics:+
cordova.gradle.include.3=phonegap-plugin-barcodescanner/odi-barcodescanner.gradle
cordova.system.library.5=com.android.support:support-v4:27.+

Chromium build failed (Windows 10)

Good afternoon. Tell me who build Chromium om Windows. It is required to brand Chromium (start page, bookmarks, tray icons, name), collect according to the instructions at the site chromium. When assembling through VS 2015, the following error list appears. The assembly takes place on the server, 64 GB RAM, Intel Xeon.
The compilation goes to 60-70%, after which VS crashes, restarts and gives an error: "The following files can not be found - all.sln - so they will not be loaded" - after this error the assembly stops, I tried 10 times already.
Ninja: build stopped: subcommand failed. Warning: premature end of file; Recovering
FAILED: obj / third_party / yasm / yasm_utils / xmalloc.obj
First, try running the build from command line:
ninja -C src/out/Default
If it still fails, make sure you carefully followed prerequisites installation instructions. Specifically, try gclient sync -f and make sure it finished normally before building.

ionic 2 execution android failed

C:\Users\ADMIN\Documents\dev\Breakingnews\trunk\Tawary\platforms\android\res\values\strings.xml: Error: Found item String/google_app_id more than one time
:mergeDebugResources FAILED
FAILURE: Build failed with an exception.
What went wrong:
BUILD FAILED
Total time: 12.285 secs
Execution failed for task ':mergeDebugResources'.
C:\Users\ADMIN\Documents\dev\Breakingnews\trunk\Tawary\platforms\android\res\values\strings.xml: Error: Found item String/google_app_id more than one time
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Error: cmd: 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 or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':mergeDebugResources'.
C:\Users\ADMIN\Documents\dev\Breakingnews\trunk\Tawary\platforms\android\res\values\strings.xml: Error: Found item String/google_app_id more than one time
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Cause of error is under the path \your project root\platforms\android\res\values then check in strings.xml, there are two with same attribute. You need to fix this according to your plugins definition.