Question by
sethi-sahil27 · Mar 13, 2018 at 01:52 PM ·
androidunity5android build
CommandInvokationFailure: Gradle build failed. with OneSignal and google analytics
CommandInvokationFailure: Gradle build failed.
D:/Program Files/Java/jdk1.8.0_151\bin\java.exe -classpath "D:\Programs\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-4.0.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx2048m" "assembleRelease"
stderr[
D:\Unity-Projects\Fun2Learn\Temp\gradleOut\build\intermediates\res\merged\release\values-v28\values-v28.xml:7:41-73: AAPT: No resource found that matches the given name (at 'dialogCornerRadius' with value '?android:attr/dialogCornerRadius').
Failed to generate resource table for split ''
D:\Unity-Projects\Fun2Learn\Temp\gradleOut\build\intermediates\res\merged\release\values-v28\values-v28.xml:7: error: Error: No resource found that matches the given name (at 'dialogCornerRadius' with value '?android:attr/dialogCornerRadius').
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processReleaseResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED in 1m 53s
]
stdout[
Starting a Gradle Daemon (subsequent builds will be faster)
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to D:\Program Files (x86)\Android\android-sdk\ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to D:\Program Files (x86)\Android\android-sdk\ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.
The setTestClassesDir(File) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the setTestClassesDirs(FileCollection) method instead.
The getTestClassesDir() method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the getTestClassesDirs() method instead.
The ConfigurableReport.setDestination(Object) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the method ConfigurableReport.setDestination(File) instead.
:preBuild UP-TO-DATE
:preReleaseBuild UP-TO-DATE
:checkReleaseManifest
:preDebugBuild UP-TO-DATE
:prepareAndroidArchCoreRuntime110Library
:prepareAndroidArchLifecycleLivedataCore110Library
:prepareAndroidArchLifecycleRuntime110Library
:prepareAndroidArchLifecycleViewmodel110Library
:prepareComAndroidSupportAnimatedVectorDrawable2800Alpha1Library
:prepareComAndroidSupportAppcompatV72800Alpha1Library
:prepareComAndroidSupportAsynclayoutinflater2800Alpha1Library
:prepareComAndroidSupportCoordinatorlayout2800Alpha1Library
:prepareComAndroidSupportCursoradapter2800Alpha1Library
:prepareComAndroidSupportCustomtabs2800Alpha1Library
:prepareComAndroidSupportCustomview2800Alpha1Library
:prepareComAndroidSupportDocumentfile2800Alpha1Library
:prepareComAndroidSupportDrawerlayout2800Alpha1Library
:prepareComAndroidSupportInterpolator2800Alpha1Library
:prepareComAndroidSupportLoader2800Alpha1Library
:prepareComAndroidSupportLocalbroadcastmanager2800Alpha1Library
:prepareComAndroidSupportPrint2800Alpha1Library
:prepareComAndroidSupportSlidingpanelayout2800Alpha1Library
:prepareComAndroidSupportSupportCompat2800Alpha1Library
:prepareComAndroidSupportSupportCoreUi2800Alpha1Library
:prepareComAndroidSupportSupportCoreUtils2800Alpha1Library
:prepareComAndroidSupportSupportFragment2800Alpha1Library
:prepareComAndroidSupportSupportMediaCompat2800Alpha1Library
:prepareComAndroidSupportSupportV42800Alpha1Library
:prepareComAndroidSupportSupportVectorDrawable2800Alpha1Library
:prepareComAndroidSupportSwiperefreshlayout2800Alpha1Library
:prepareComAndroidSupportViewpager2800Alpha1Library
:prepareComGoogleAndroidGmsPlayServicesAnalytics1180Library
:prepareComGoogleAndroidGmsPlayServicesAnalyticsImpl1180Library
:prepareComGoogleAndroidGmsPlayServicesAnalyticsImplLicense1180Library
:prepareComGoogleAndroidGmsPlayServicesAnalyticsLicense1180Library
:prepareComGoogleAndroidGmsPlayServicesBase1180Library
:prepareComGoogleAndroidGmsPlayServicesBaseLicense1180Library
:prepareComGoogleAndroidGmsPlayServicesBasement1180Library
:prepareComGoogleAndroidGmsPlayServicesBasementLicense1180Library
:prepareComGoogleAndroidGmsPlayServicesGcm1180Library
:prepareComGoogleAndroidGmsPlayServicesGcmLicense1180Library
:prepareComGoogleAndroidGmsPlayServicesIid1180Library
:prepareComGoogleAndroidGmsPlayServicesIidLicense1180Library
:prepareComGoogleAndroidGmsPlayServicesLocation1180Library
:prepareComGoogleAndroidGmsPlayServicesLocationLicense1180Library
:prepareComGoogleAndroidGmsPlayServicesTagmanagerV4Impl1180Library
:prepareComGoogleAndroidGmsPlayServicesTagmanagerV4ImplLicense1180Library
:prepareComGoogleAndroidGmsPlayServicesTasks1180Library
:prepareComGoogleAndroidGmsPlayServicesTasksLicense1180Library
:prepareOnesignalUnityLibrary
:prepareVuforiaWrapperLibrary
:OneSignalConfig:preBuild UP-TO-DATE
:OneSignalConfig:preReleaseBuild UP-TO-DATE
:OneSignalConfig:checkReleaseManifest
:OneSignalConfig:prepareReleaseDependencies
:OneSignalConfig:compileReleaseAidl
:OneSignalConfig:compileReleaseNdk NO-SOURCE
:OneSignalConfig:compileLint
:OneSignalConfig:copyReleaseLint NO-SOURCE
:OneSignalConfig:mergeReleaseShaders
:OneSignalConfig:compileReleaseShaders
:OneSignalConfig:generateReleaseAssets
:OneSignalConfig:mergeReleaseAssets
:OneSignalConfig:mergeReleaseProguardFiles
:OneSignalConfig:packageReleaseRenderscript NO-SOURCE
:OneSignalConfig:compileReleaseRenderscript
:OneSignalConfig:generateReleaseResValues
:OneSignalConfig:generateReleaseResources
:OneSignalConfig:packageReleaseResources
:OneSignalConfig:processReleaseManifest
:OneSignalConfig:generateReleaseBuildConfig
:OneSignalConfig:processReleaseResources
:OneSignalConfig:generateReleaseSources
:OneSignalConfig:incrementalReleaseJavaCompilationSafeguard
:OneSignalConfig:javaPreCompileRelease
:OneSignalConfig:compileReleaseJavaWithJavac
:OneSignalConfig:processReleaseJavaRes NO-SOURCE
:OneSignalConfig:transformResourcesWithMergeJavaResForRelease
:OneSignalConfig:transformClassesAndResourcesWithSyncLibJarsForRelease
:OneSignalConfig:mergeReleaseJniLibFolders
:OneSignalConfig:transformNativeLibsWithMergeJniLibsForRelease
:OneSignalConfig:transformNativeLibsWithSyncJniLibsForRelease
:OneSignalConfig:bundleRelease
:prepareReleaseDependencies
:compileReleaseAidl
:compileReleaseRenderscript
:generateReleaseBuildConfig
:generateReleaseResValues
:generateReleaseResources
:mergeReleaseResources
:processReleaseManifest
:processReleaseResources FAILED
79 actionable tasks: 79 executed
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1 progress, System.String error)
UnityEditor.Android.GradleWrapper.Run (System.String workingdir, System.String task, System.Action`1 progress)
Rethrow as GradleInvokationException: Gradle build failed
UnityEditor.Android.GradleWrapper.Run (System.String workingdir, System.String task, System.Action`1 progress)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
This is the error that i get when I build the apk with OneSignal and Googleanalyticsv4 plugin in my project. I'm running Unity 2017.3.0f3. I was able to build an apk with just the oneSignal plugin in the project. Been stuck for a while now, if anyone could help out, I'd be grateful. Thanks.
Comment
Best Answer
Answer by sethi-sahil27 · Mar 14, 2018 at 08:18 PM
So I was able to solve the issue, the issue was because of the newer google support libraries that had the version number 28.0.0alpha1. I edited the 'OneSignalEditorScriptAndroid' to use older libraries by editing these lines:
private static readonly string PLAY_SERVICES_VERSION = "+"; private static readonly string ANDROID_SUPPORT_VERSION = "+";
to this:
private static readonly string PLAY_SERVICES_VERSION = "+";
private static readonly string ANDROID_SUPPORT_VERSION = "27+";
Hope this helps to anyone looking for an answer.