Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to add a Gradle Android.defaultConfig #454

Closed
NathanaelA opened this issue May 17, 2016 · 3 comments
Closed

Need to add a Gradle Android.defaultConfig #454

NathanaelA opened this issue May 17, 2016 · 3 comments

Comments

@NathanaelA
Copy link
Contributor

If you use Google Play Services you can create a issue where your app will not be installable because of the app conflicting with any other app the GPS was installed that might not have a defaultConfig.applicationId. Android Studio by defaults creates this to eliminate the issue, but we also need to as the issue will prevent ANY two apps by ALL developers that don't have this set to be installable on the same device.

The solution is in the App_Resources/Android/app.gradle to add the (--> line):
defaultConfig {
generatedDensities = []
--> applicationId = "my.package.id"
}
Or we can do this in the main build.gradle file and somehow pull the value from the main package.json file..

Links:
https://code.google.com/p/analytics-issues/issues/detail?id=784
https://code.google.com/p/android/issues/detail?id=193567
http://stackoverflow.com/questions/16267785/install-shows-error-in-console-install-failed-conflicting-provider

@Plamen5kov
Copy link
Contributor

Hi @NathanaelA,
We try to stay as close to a default android studio project, and the case you suggest is an excellent spot, that will save us trouble in the future. Because CLI already has logic for filtering the app-name and package, we can reuse it to replace a placeholder in App_Resources/Android/app.gradle.

@Plamen5kov Plamen5kov added the bug label May 17, 2016
@Jpaagt
Copy link

Jpaagt commented May 17, 2016

I would like to add that this issue has already happened to me with an NS app. I created the following SO question for this:
http://stackoverflow.com/questions/37260735/issue-running-more-than-one-nativescript-application-on-the-same-android-device

@petekanev
Copy link
Contributor

Changes are in the nativescript-cli/master - Add interpolation for app.gradle applicationId value in android projects

@petekanev petekanev self-assigned this Jun 23, 2016
@petekanev petekanev added this to the 2.1 milestone Jun 30, 2016
@petekanev petekanev changed the title Need to add a Grade Android.defaultConfig Need to add a Gradle Android.defaultConfig Jun 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants