Project build issue after adding Flicker and Mapbox API key

android

#1

I am want to build the nativescript-angular example of “ng-book-The Complete Book on Angular 5”, but after adding Flickr API key. I am getting the below error:

D:\rahi-akela\myworks\nativescript-projects\ns-geo-photo-application>tns build android
Skipping prepare.
Building project…
Gradle build…
+ applying user-defined configuration from D:\rahi-akela\myworks\nativescript-projects\ns-geo-photo-application\app\App_Resources\Android\app.gradle
+ add include.gradle from D:\rahi-akela\myworks\nativescript-projects\ns-geo-photo-application\node_modules\nativescript-geolocation\platforms\android\include.gradle
+ add include.gradle from D:\rahi-akela\myworks\nativescript-projects\ns-geo-photo-application\node_modules\nativescript-mapbox\platforms\android\include.gradle
+ applying plugin configuration from D:\rahi-akela\myworks\nativescript-projects\ns-geo-photo-application\platforms\android\app\build\configurations\nativescript-geolocation\include.gradle
+ applying plugin configuration from D:\rahi-akela\myworks\nativescript-projects\ns-geo-photo-application\platforms\android\app\build\configurations\nativescript-mapbox\include.gradle
+ adding nativescript runtime package dependency: nativescript-optimized
+ adding aar plugin dependency: D:\rahi-akela\myworks\nativescript-projects\ns-geo-photo-application\node_modules\nativescript-geolocation\platforms\android\nativescript_geolocation.aar
+ adding aar plugin dependency: D:\rahi-akela\myworks\nativescript-projects\ns-geo-photo-application\node_modules\tns-core-modules-widgets\platforms\android\widgets-release.aar
false
D:\rahi-akela\myworks\nativescript-projects\ns-geo-photo-application\platforms\android\app\build\intermediates\res\merged\F0F1\debug\values-v26\values-v26.xml:15:21-54: AAPT: No resource found that matches the given name: attr ‘android:keyboardNavigationCluster’.

D:\rahi-akela\myworks\nativescript-projects\ns-geo-photo-application\platforms\android\app\build\intermediates\res\merged\F0F1\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 ‘:app:processF0F1DebugResources’.

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.

  • Get more help at https://help.gradle.org

BUILD FAILED in 2s
Command gradlew.bat failed with exit code 1

build android

┌─────────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Usage │ Synopsis │
│ General │ $ tns build android [–compileSdk ] [–key-store-path --key-store-password --key-store-alias --key-store-alias │
│ │ -password ] [–release] [–static-bindings] [–copy-to ] [–bundle [] [–env.*]] │
└─────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

Builds the project for Android and produces an APK that you can manually deploy on device or in the native emulator.

Options

* --compileSdk - Sets the Android SDK that will be used to build the project.
* --release - If set, produces a release build. Otherwise, produces a debug build. When set, you must also specify the --key-store-* options.
* --key-store-path - Specifies the file path to the keystore file (P12) which you want to use to code sign your APK. You can use the --key-store-* options along with --release to produce a signed release build. You need to specify all --key-store-* options.
* --key-store-password - Provides the password for the keystore file specified with --key-store-path. You can use the --key-store-* options along with --release to produce a signed release build. You need to specify all --key-store-* options.
* --key-store-alias - Provides the alias for the keystore file specified with --key-store-path. You can use the --key-store-* options along with --release to produce a signed release build. You need to specify all --key-store-* options.
* --key-store-alias-password - Provides the password for the alias specified with --key-store-alias-password. You can use the --key-store-* options along with --release to produce a signed release build. You need to specify all --key-store-* options.
* --copy-to - Specifies the file path where the built .apk will be copied. If it points to a non-existent directory, it will be created. If the specified value is directory, the original file name will be used.
* --bundle - Specifies that a bundler (e.g. webpack) should be used if one is present. If no value is passed will default to webpack.
* --env.* - Specifies additional flags that the bundler may process. May be passed multiple times. For example: --env.uglify --env.snapshot.

Attributes

is a valid Android API level. For example: 22, 23.


Please help me becoz I am totally new to nativescript-angular and android mobile development.

Thanks
Rahi