Closed NickIliev closed 6 years ago
@manikjain I've used this test project but the issue is not reproducible on my side. Try updating your NatriveScript to latest version (4.0.2)
@NickIliev I'm running a genymotion custom android phone as an emulator for this - Custom Phone 7.1.0 - API 25. Could you confirm if you tested on a similar API version?
I tried the following after updating NS to 4.0.2
, but it still failed with the same build errors:
npm uninstall -g nativescript
npm install -g nativescript
tns update
from inside the root folder of my projecttns run android --emulator
I also cloned https://github.com/NickIliev/NS-Issues-2018-II where you created a similar project and that's failing as well.
Also tried building the project on an actual android device and it failed with the same error after I install nativescript-background-http
.
@NickIliev I've cloned my project here: https://github.com/manikjain/issues/tree/master/NativeScript/nativescript-background-http/issue_154
Could you please try running the above on your end and let me know if it fails?
Thanks to @fthuin, the issue got resolved once I installed additional SDK tools from Android Studio's SDK manager. I also did ./gradlew cleanBuildCache
to clean the cache prior to rebuilding and running the project. :)
/Users/manik.jain/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.0.2.aar/6c1b8ac89565868917b47f1df795dca3/res/values-v26/values-v26.xml:9:5-12:13: AAPT: error: resource android:attr/colorError not found.
suggested that it probably wasn't able to find some associated packages for API ver. 27.0.2
.
@manikjain thanks for sharing this, can you mention which additional SDK tools you installed?
EDIT: I fixed this by doing the following: https://github.com/NativeScript/nativescript-background-http/issues/169#issuecomment-416468258
I think this should be opened again, there is currently no solution provided. I have this bug now, and have tried to find "additional SDK tools" in the studio SDK manager with no luck. Project is failing to build as per the original issue.
For reference, I've installed SDK 25,26,27. SDK Tools: Android SDK Build-Tools, Android SDK Platform-Tools, Android SDK Tools.
I have rebuilt my project (complete node_module reinstall, platform add/remove) and I have tried running ./gradew CleanBuildCache
I really need this plugin for my project so it would be fantastic to get some help here.
@rohanrichards In Android Studio, go in the preferences/settings, Appearance & Behavior
> System Settings
> Android SDK
. Go in SDK Tools
tab, click on the checkbox "Show Package Details" (bottom right of the modal), then go in the dropdown for Android SDK Build-Tools and select the missing version.
You'll see all available versions, not only the default proposed by Android Studio.
How to know the missing version ?
In the error path previously mentioned
/Users/manik.jain/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.0.2.aar/6c1b8ac89565868917b47f1df795dca3/res/values-v26/values-v26.xml:9:5-12:13: AAPT: error: resource android:attr/colorError not found.
You can clearly find 27.0.2 is missing. It might be different for you
From @manikjain on May 28, 2018 2:21
Did you verify this is a real problem by searching the [NativeScript Forum]
Yes. (I'm not sure if this issue must be created inside
nativescript-background-http
repo instead).Tell us about the problem
I'm running a project with https://github.com/NativeScript/template-drawer-navigation-ng as the template and as soon as I install the
nativescript-background-http
plugin viatns plugin add nativescript-background-http
ornpm i nativescript-background-http --save
, the android builds starts to fail.Which platform(s) does your issue occur on?
Android
Please provide the following version numbers that your issue occurs with:
Please tell us how to recreate the issue in as much detail as possible.
tns plugin add nativescript-background-http
ornpm i nativescript-background-http --save
Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.
Copied from original issue: NativeScript/NativeScript#5872