Unable to Package Build with cordova-background-geolocation-lt


#1

Hi there,

Not sure if anyone else recently tried to build with the cordova-background-geolocation-lt plugin.

When I run ionic package build ios --release without that specific plugin the app builds fine, however when I include the geolocation plugin it doesnt work.

… from the logs it looks like maybe something to do with IOSurface for architecture armv7??

Thanks in advance to anyone who may have any clues as to whats going on.
(I’ve built the app with the plugin fine about a month ago. Sept 5, 2017 to be exact.)

Here’s the last few lines of the log:

ANDROID_HOME=/opt/android-sdk
JAVA_HOME=/usr/lib/jvm/java-8-oracle
:wrapper

BUILD SUCCESSFUL

Total time: 0.786 secs
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_cmmjfxj7s279swol7xqn0fj8l.run(/home/package/workspace/apps-ad904e3a-92/cordova/platforms/android/build.gradle:139)
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
: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
: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
:prepareAndroidArchLifecycleRuntime100Library
:prepareComAndroidSupportAnimatedVectorDrawable2610Library
:prepareComAndroidSupportAppcompatV72610Library
:prepareComAndroidSupportSupportCompat2610Library
:prepareComAndroidSupportSupportCoreUi2610Library
:prepareComAndroidSupportSupportCoreUtils2610Library
:prepareComAndroidSupportSupportFragment2610Library
:prepareComAndroidSupportSupportMediaCompat2610Library
:prepareComAndroidSupportSupportV132340Library
:prepareComAndroidSupportSupportV42610Library
:prepareComAndroidSupportSupportVectorDrawable2610Library
:prepareComGoogleAndroidGmsPlayServicesBase1142Library
:prepareComGoogleAndroidGmsPlayServicesBaseLicense1142Library
:prepareComGoogleAndroidGmsPlayServicesBasement1142Library
:prepareComGoogleAndroidGmsPlayServicesBasementLicense1142Library
:prepareComGoogleAndroidGmsPlayServicesGcm1142Library
:prepareComGoogleAndroidGmsPlayServicesGcmLicense1142Library
:prepareComGoogleAndroidGmsPlayServicesIid1142Library
:prepareComGoogleAndroidGmsPlayServicesIidLicense1142Library
:prepareComGoogleAndroidGmsPlayServicesLocation1142Library
:prepareComGoogleAndroidGmsPlayServicesLocationLicense1142Library
:prepareComGoogleAndroidGmsPlayServicesTasks1142Library
:prepareComGoogleAndroidGmsPlayServicesTasksLicense1142Library
:prepareMeLeolinShortcutBadger1114Library
:prepareOrgApacheCordovaCordovaLib623DebugLibrary
:prepareTslocationmanagerLibrary
:prepareDebugDependencies
:compileDebugAidl
:compileDebugRenderscript
:generateDebugBuildConfig
:generateDebugResValues
:generateDebugResources
:mergeDebugResources
:processDebugManifest
:processDebugResources/home/package/workspace/apps-ad904e3a-92/cordova/platforms/android/build/intermediates/res/merged/debug/values-v26/values-v26.xml:15:21-54: AAPT: No resource found that matches the given name: attr 'android:keyboardNavigationCluster'.
    
/home/package/workspace/apps-ad904e3a-92/cordova/platforms/android/build/intermediates/res/merged/debug/values-v26/values-v26.xml:15: error: Error: No resource found that matches the given name: attr 'android:keyboardNavigationCluster'.


 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processDebugResources'.
> 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

Total time: 5.367 secs
Error: /home/package/workspace/apps-ad904e3a-92/cordova/platforms/android/gradlew: 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.
/home/package/workspace/apps-ad904e3a-92/cordova/platforms/android/build/intermediates/res/merged/debug/values-v26/values-v26.xml:15:21-54: AAPT: No resource found that matches the given name: attr 'android:keyboardNavigationCluster'.
    
/home/package/workspace/apps-ad904e3a-92/cordova/platforms/android/build/intermediates/res/merged/debug/values-v26/values-v26.xml:15: error: Error: No resource found that matches the given name: attr 'android:keyboardNavigationCluster'.



FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processDebugResources'.
> 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.

here’s my config:

cli packages:

    @ionic/cli-utils  : 1.6.0 (/Users/donwong15/Documents/00-projects/hauul-driver-production/myApp/node_modules/ionic/node_modules/@ionic/cli-utils)
    ionic (Ionic CLI) : 3.6.0 (/Users/donwong15/Documents/00-projects/hauul-driver-production/myApp/node_modules/ionic)

global packages:

    Cordova CLI : 7.0.1 
    Gulp CLI    : CLI version 0.3.0 Local version 3.9.1

local packages:

    @ionic/cli-plugin-cordova : 1.4.1
    @ionic/cli-plugin-gulp    : 1.0.2
    @ionic/cli-plugin-ionic1  : 2.0.1
    Cordova Platforms         : android 6.2.3 ios 4.4.0
    Ionic Framework           : unknown

System:

    Node       : v8.1.0
    OS         : macOS Sierra
    Xcode      : Xcode 9.0 Build version 9A235 
    ios-deploy : 1.9.1 
    ios-sim    : 5.0.13 
    npm        : 5.3.0 

#2

Bump. I’m running into the same issue with this and have not found any solution. I also had successful builds a few weeks ago and it is now failing regularly with the above error.

Any help would be much appreciated.

Edit to clarify:

> Compiling IonicKeyboard.m
> Linking Walk\

[x] ld: framework not found IOSurface for architecture armv7



[x] clang: error: linker command failed with exit code 1 (use -v to see invocation)


> Linking Walk\

[x] ld: framework not found IOSurface for architecture arm64



[x] clang: error: linker command failed with exit code 1 (use -v to see invocation)


** ARCHIVE FAILED **


The following build commands failed:
Ld /Users/ionic/Library/Developer/Xcode/DerivedData/Walk_for_Spotwalk-hintwbpxgoddcohburhczukuwvrq/Build/Intermediates/ArchiveIntermediates/Walk\ for\ Spotwalk/IntermediateBuildFilesPath/Walk\ for\ Spotwalk.build/Release-iphoneos/Walk\ for\ Spotwalk.build/Objects-normal/armv7/Walk\ for\ Spotwalk normal armv7
Ld /Users/ionic/Library/Developer/Xcode/DerivedData/Walk_for_Spotwalk-hintwbpxgoddcohburhczukuwvrq/Build/Intermediates/ArchiveIntermediates/Walk\ for\ Spotwalk/IntermediateBuildFilesPath/Walk\ for\ Spotwalk.build/Release-iphoneos/Walk\ for\ Spotwalk.build/Objects-normal/arm64/Walk\ for\ Spotwalk normal arm64
(2 failures)
[07:57:35]: Exit status: 65

#3

Hey

The build only works on cordova-android@6.3.0

Currently it doesn’t seem like ionic platform build supports android@6.3.0… which kind of blows my mind a little bit. They’re having people downgrade to 6.2.x for now.

See this post:
https://ionic.zendesk.com/hc/en-us/articles/115012901127-Android-build-failure-Failed-to-install-Android-SDK-Platform-26

So, I was forced to build it locally, which wasn’t too hard of a process (took me a few days to figure it out). But at least I learned how to build an release apk with android@6.3.0 on my local Mac. =)


#4

Whoops looks like your output is for iOS.

For iOS I believe it’s a similar issue where you need to install XCode9.
But ionic package build seems to be still using XCode8.

I had to install Xcode on my mac and build locally for now.


#5

Thanks for the info, that’s quite helpful. Anyone know when Ionic Package is slated to support XCode 9?

@donw I gave this a shot on android @6.3.0 but still had no luck. My local build succeeded but now the bgGeo plugin is not working. By any chance do you know what version of the cordova-background-geolocation-lt plugin you’ve gotten to build correctly?

Thanks again for the help.


#6

I’m using the latest 2.8.5 right now.

Are you building for android or ios?