tns run android with a specific sdk
I just created a new application and added android platform. Since I failed to install API 28 for days, I want to run the project against the working SDK 21. How can I configure the application to run with sdk 21?
My app/App_resources/android/app.gradle is the default one with:
android {
defaultConfig {
generatedDensities =
}
aaptOptions {
additionalParameters "--no-version-vectors"
}
}
in platforms/android/.gradle/ I see 4.10.2
while my build.gradle is:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
When i run tns run android --emulator
the message is:
Gradle build...
+ setting applicationId
+ applying user-defined configuration from D:pyworksagrigo7mobileappagrigoappApp_ResourcesAndroidapp.gradle
Using support library version 28.0.0
+ adding nativescript runtime package dependency: nativescript-optimized-with-inspector
+ adding aar plugin dependency: D:pyworksagrigo7mobileappagrigonode_modulestns-core-modules-widgetsplatformsandroidwidgets-release.aar
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Failed to find Platform SDK with path: platforms;android-28
In my Android SDK, I tried to install API 28 but it kept on failing and failing. My current SDK looks like:
given API 21 is installed, I tried:
tns run android --compileSdk 21 --emulator
It first does show 28.0.0. then gives a lot of errors:
+ setting applicationId
+ applying user-defined configuration from D:pyworksagrigo7mobileappagrigoappApp_ResourcesAndroidapp.gradle
**Using support library version 28.0.0**
+ adding nativescript runtime package dependency: nativescript-optimized-with-inspector
+ adding aar plugin dependency: D:pyworksagrigo7mobileappagrigonode_modulestns-core-modules-widgetsplatformsandroidwidgets-release.aar
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
Output: error: resource android:style/TextAppearance.Material.Widget.Button.Borderless.Colored not found.
error: resource android:style/TextAppearance.Material.Widget.Button.Colored not found.
nativescript
add a comment |
I just created a new application and added android platform. Since I failed to install API 28 for days, I want to run the project against the working SDK 21. How can I configure the application to run with sdk 21?
My app/App_resources/android/app.gradle is the default one with:
android {
defaultConfig {
generatedDensities =
}
aaptOptions {
additionalParameters "--no-version-vectors"
}
}
in platforms/android/.gradle/ I see 4.10.2
while my build.gradle is:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
When i run tns run android --emulator
the message is:
Gradle build...
+ setting applicationId
+ applying user-defined configuration from D:pyworksagrigo7mobileappagrigoappApp_ResourcesAndroidapp.gradle
Using support library version 28.0.0
+ adding nativescript runtime package dependency: nativescript-optimized-with-inspector
+ adding aar plugin dependency: D:pyworksagrigo7mobileappagrigonode_modulestns-core-modules-widgetsplatformsandroidwidgets-release.aar
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Failed to find Platform SDK with path: platforms;android-28
In my Android SDK, I tried to install API 28 but it kept on failing and failing. My current SDK looks like:
given API 21 is installed, I tried:
tns run android --compileSdk 21 --emulator
It first does show 28.0.0. then gives a lot of errors:
+ setting applicationId
+ applying user-defined configuration from D:pyworksagrigo7mobileappagrigoappApp_ResourcesAndroidapp.gradle
**Using support library version 28.0.0**
+ adding nativescript runtime package dependency: nativescript-optimized-with-inspector
+ adding aar plugin dependency: D:pyworksagrigo7mobileappagrigonode_modulestns-core-modules-widgetsplatformsandroidwidgets-release.aar
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
Output: error: resource android:style/TextAppearance.Material.Widget.Button.Borderless.Colored not found.
error: resource android:style/TextAppearance.Material.Widget.Button.Colored not found.
nativescript
add a comment |
I just created a new application and added android platform. Since I failed to install API 28 for days, I want to run the project against the working SDK 21. How can I configure the application to run with sdk 21?
My app/App_resources/android/app.gradle is the default one with:
android {
defaultConfig {
generatedDensities =
}
aaptOptions {
additionalParameters "--no-version-vectors"
}
}
in platforms/android/.gradle/ I see 4.10.2
while my build.gradle is:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
When i run tns run android --emulator
the message is:
Gradle build...
+ setting applicationId
+ applying user-defined configuration from D:pyworksagrigo7mobileappagrigoappApp_ResourcesAndroidapp.gradle
Using support library version 28.0.0
+ adding nativescript runtime package dependency: nativescript-optimized-with-inspector
+ adding aar plugin dependency: D:pyworksagrigo7mobileappagrigonode_modulestns-core-modules-widgetsplatformsandroidwidgets-release.aar
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Failed to find Platform SDK with path: platforms;android-28
In my Android SDK, I tried to install API 28 but it kept on failing and failing. My current SDK looks like:
given API 21 is installed, I tried:
tns run android --compileSdk 21 --emulator
It first does show 28.0.0. then gives a lot of errors:
+ setting applicationId
+ applying user-defined configuration from D:pyworksagrigo7mobileappagrigoappApp_ResourcesAndroidapp.gradle
**Using support library version 28.0.0**
+ adding nativescript runtime package dependency: nativescript-optimized-with-inspector
+ adding aar plugin dependency: D:pyworksagrigo7mobileappagrigonode_modulestns-core-modules-widgetsplatformsandroidwidgets-release.aar
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
Output: error: resource android:style/TextAppearance.Material.Widget.Button.Borderless.Colored not found.
error: resource android:style/TextAppearance.Material.Widget.Button.Colored not found.
nativescript
I just created a new application and added android platform. Since I failed to install API 28 for days, I want to run the project against the working SDK 21. How can I configure the application to run with sdk 21?
My app/App_resources/android/app.gradle is the default one with:
android {
defaultConfig {
generatedDensities =
}
aaptOptions {
additionalParameters "--no-version-vectors"
}
}
in platforms/android/.gradle/ I see 4.10.2
while my build.gradle is:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
When i run tns run android --emulator
the message is:
Gradle build...
+ setting applicationId
+ applying user-defined configuration from D:pyworksagrigo7mobileappagrigoappApp_ResourcesAndroidapp.gradle
Using support library version 28.0.0
+ adding nativescript runtime package dependency: nativescript-optimized-with-inspector
+ adding aar plugin dependency: D:pyworksagrigo7mobileappagrigonode_modulestns-core-modules-widgetsplatformsandroidwidgets-release.aar
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Failed to find Platform SDK with path: platforms;android-28
In my Android SDK, I tried to install API 28 but it kept on failing and failing. My current SDK looks like:
given API 21 is installed, I tried:
tns run android --compileSdk 21 --emulator
It first does show 28.0.0. then gives a lot of errors:
+ setting applicationId
+ applying user-defined configuration from D:pyworksagrigo7mobileappagrigoappApp_ResourcesAndroidapp.gradle
**Using support library version 28.0.0**
+ adding nativescript runtime package dependency: nativescript-optimized-with-inspector
+ adding aar plugin dependency: D:pyworksagrigo7mobileappagrigonode_modulestns-core-modules-widgetsplatformsandroidwidgets-release.aar
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
Output: error: resource android:style/TextAppearance.Material.Widget.Button.Borderless.Colored not found.
error: resource android:style/TextAppearance.Material.Widget.Button.Colored not found.
nativescript
nativescript
asked Jan 2 at 22:54
Nie SelamNie Selam
485417
485417
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
I think you are getting confused between the support library and SDK version. They are different and your support library's major version should always match your SDK's major version which means you can't use support library 28.x with SDK 21.x.
@Jenlooper had given a brief about this breaking change at the 5.0 launch, you must specify the right support library version in the gradle file (project.ext.supportVersion
).
Besides, Google Play restricts all new app submissions to target SDK 26 (Android 8.0) so I would recommend you to try SDK 26 instead of 21 which you can't use to publish.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54014242%2ftns-run-android-with-a-specific-sdk%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I think you are getting confused between the support library and SDK version. They are different and your support library's major version should always match your SDK's major version which means you can't use support library 28.x with SDK 21.x.
@Jenlooper had given a brief about this breaking change at the 5.0 launch, you must specify the right support library version in the gradle file (project.ext.supportVersion
).
Besides, Google Play restricts all new app submissions to target SDK 26 (Android 8.0) so I would recommend you to try SDK 26 instead of 21 which you can't use to publish.
add a comment |
I think you are getting confused between the support library and SDK version. They are different and your support library's major version should always match your SDK's major version which means you can't use support library 28.x with SDK 21.x.
@Jenlooper had given a brief about this breaking change at the 5.0 launch, you must specify the right support library version in the gradle file (project.ext.supportVersion
).
Besides, Google Play restricts all new app submissions to target SDK 26 (Android 8.0) so I would recommend you to try SDK 26 instead of 21 which you can't use to publish.
add a comment |
I think you are getting confused between the support library and SDK version. They are different and your support library's major version should always match your SDK's major version which means you can't use support library 28.x with SDK 21.x.
@Jenlooper had given a brief about this breaking change at the 5.0 launch, you must specify the right support library version in the gradle file (project.ext.supportVersion
).
Besides, Google Play restricts all new app submissions to target SDK 26 (Android 8.0) so I would recommend you to try SDK 26 instead of 21 which you can't use to publish.
I think you are getting confused between the support library and SDK version. They are different and your support library's major version should always match your SDK's major version which means you can't use support library 28.x with SDK 21.x.
@Jenlooper had given a brief about this breaking change at the 5.0 launch, you must specify the right support library version in the gradle file (project.ext.supportVersion
).
Besides, Google Play restricts all new app submissions to target SDK 26 (Android 8.0) so I would recommend you to try SDK 26 instead of 21 which you can't use to publish.
answered Jan 3 at 6:24
ManojManoj
7,59621024
7,59621024
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54014242%2ftns-run-android-with-a-specific-sdk%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown