NativeScript / nativescript-background-http

Background Upload plugin for the NativeScript framework
Apache License 2.0
102 stars 50 forks source link

Failed build for APIs: 25, 24, 23, 22. #128

Closed michael-vasyliv closed 6 years ago

michael-vasyliv commented 6 years ago

The build for APIs 25, 24, 23, 22 are FAILED. Source code in the https://github.com/NativeScript/nativescript-background-http/tree/master/demo Steps to reproduce: run in command prompt

tns build android --bundle --env.uglify --env.aot --release --key-store-path <path-to-your-keystore> --key-store-password <your-key-store-password> --key-store-alias <your-alias-name> --key-store-alias-password <your-alias-password> --compileSdk=26

the build is successful. then

tns platform remove android
tns build android --bundle --env.uglify --env.aot --release --key-store-path <path-to-your-keystore> --key-store-password <your-key-store-password> --key-store-alias <your-alias-name> --key-store-alias-password <your-alias-password> --compileSdk=25

BUILD FAILED the same for --compileSdk=24, --compileSdk=23, --compileSdk=22

the error is:

Building project...
Gradle build...
         + applying user-defined configuration from E:\TEST\nativescript-background-http-master\demo\app\App_Resources\Android\app.gradle
         + add include.gradle from E:\TEST\nativescript-background-http-master\demo\node_modules\nativescript-background-http\platforms\android\include.gradle
         + applying plugin configuration from E:\TEST\nativescript-background-http-master\demo\platforms\android\app\build\configurations\nativescript
-background-http\include.gradle
         + adding nativescript runtime package dependency: nativescript-optimized
         + adding aar plugin dependency: E:\TEST\nativescript-background-http-master\demo\node_modules\tns-core-modules-widgets\platforms\android\widgets-release.aar
false
E:\TEST\nativescript-background-http-master\demo\platforms\android\app\build\intermediates\res\merged\F0\release\values-v26\values-v26.xml:15:21-54: A
APT: No resource found that matches the given name: attr 'android:keyboardNavigationCluster'.

E:\TEST\nativescript-background-http-master\demo\platforms\android\app\build\intermediates\res\merged\F0\release\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:processF0ReleaseResources'.
> 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 12s
Command gradlew.bat failed with exit code 1
# build android
tsonevn commented 6 years ago

Hi @vasyliv, I tested your case, however, was unable to recreate this problem on my side. Make sure that you have installed Android SDK Build-tools in the Android SDK Manager, for the needed API level.

michael-vasyliv commented 6 years ago

@tsonevn could you add a list of versions that you have?

tsonevn commented 6 years ago

Hi @vasyliv, I am attaching ScreenShot of the Build-tools list, which I have on the machine. screen shot 2018-04-11 at 5 20 04 pm

michael-vasyliv commented 6 years ago

@tsonevn thanks for your answers. The problem isn`t actual (however I still can't build the demo to API 25, but a can build other projects like https://github.com/NativeScript/template-drawer-navigation-ng etc.)

tsonevn commented 6 years ago

Hi @vasyliv, Did you try to specify the API level as follows: tns build android --bundle --env.uglify --env.aot --release --key-store-path <path-to-your-keystore> --key-store-password <your-key-store-password> --key-store-alias <your-alias-name> --key-store-alias-password <your-alias-password> --compileSdk=25.0.0. There are multiple releases for API level 25, and if you do not set up the exact one, the build might not execute correctly.

michael-vasyliv commented 6 years ago

@tsonevn thanks for your help, yes I can build the demo with

tns build android --bundle --env.uglify --env.aot --release --key-store-path <path-to-your-keystore> --key-store-password <your-key-store-password> --key-store-alias <your-alias-name> --key-store-alias-password <your-alias-password> --compileSdk=25.0.0

i guess the problem was that i have tried --compileSdk=25.