Skip to content

App is not starting after deployment #576

Closed

Description

@NickIliev

From @aplut on October 5, 2016 16:18

Hi,

after successful building my app is deployed, I see in my console:

Project successfully built
The system failed to delete the package for an unspecified reason.
Successfully deployed on device with identifier 'emulator-5554'.

But the app in not starting, I'm able to go to menu and start the app manually. Additionally after adding --watch option I can see a lot o successful log in the console but nothing happen.

I'm using Ubuntu 16.04 LTS. I have tried with android API 23 and 24.

My NativeScript stack:

Module Version Version Status
nativescript 2.3.0 2.3.0 Up to date
tns-core-modules 2.4.0-2016-09-30-4270 2.3.0 Up to date
tns-android 2.3.0 2.3.0 Up to date
tns-ios 2.4.0-2016.9.16.4 2.3.0 Up to date

Thanks,
Adrian

Copied from original issue: NativeScript/nativescript-cli#2098

Activity

  1. NickIliev commented on Oct 6, 2016

    @NickIliev
    Author

    From @aplut on October 5, 2016 16:41

    I have found a solution.

    Here is described what is the problem:
    NativeScript/nativescript-cli#2092

    But somewhere is a bug because I didn't change my package. After creating app during the wizard I have had:

    package.json:
    "id": "pl.test.app_name"

    app.gradle:
    applicationId = "org.nativescript.app_name"

    Cheers,
    Adrian

  2. NickIliev commented on Oct 6, 2016

    @NickIliev
    Author

    Hey @aplut glad to know you have found the solution.

    Related to NativeScript/nativescript-cli#2098

  3. Plamen5kov commented on Oct 6, 2016

    @Plamen5kov
    Contributor

    Hi @aplut, the bug you're encountering is probably caused by the fact that is recommended to only have alphanumeric symbols and '.' (dots) as separators in your application id and package name. So my best guess is you'll fix the issue if you change the name of the app to: pl.test.appname instead of pl.test.app_name.

  4. aplut commented on Oct 6, 2016

    @aplut

    @Plamen5kov sorry I've put here an example package name to explain the issue. My package didn't include _. It was something like you've mentioned -> pl.test.appname

    Best regards,
    Adrian

  5. Plamen5kov commented on Oct 6, 2016

    @Plamen5kov
    Contributor

    @aplut I understand, in this case we'll take a look at the problem.

  6. self-assigned this
    on Oct 6, 2016
  7. manijak commented on Nov 1, 2016

    @manijak

    I have the same issue, and cannot start the app. But it's more serious. My app is already deployed to GooglePlay, and I cannot change the package id.

    The applicationId in the .gradle file is of the "xx.xxxxxx" format. This is what the customer had in the original app, and we deployed the new one as an update. So the packageID remains the same.
    The app id in the package.json on root, is "xx.xxxxx.xxxx" format, but it has always been like this and we never had issues before.

    I have not changed anything in the app, not the id nor the appname, nor the location. Only updated tns version and core-modules to 2.3.0. removed platforms and re-added them.

    I can see that the app gets deployed to the emulator (geny), but does not start.

  8. Plamen5kov commented on Nov 1, 2016

    @Plamen5kov
    Contributor

    Hi @manijak,
    can you give me the steps to reproduce, so that I get the error, you pointed out:

    java.lang.RuntimeException: Unable to resume activity {com.myapp/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: 
    Calling js method onCreateView failed
    Error: java.lang.NullPointerException
        android.widget.TextView.setTextColor(TextView.java:3147)
    
  9. manijak commented on Nov 1, 2016

    @manijak

    @Plamen5kov never mind that, it was a separate issue. I've updated my original post.

    My issue is the same as NickIliev, but I cannot change the original app.gradle applicationId.

  10. Plamen5kov commented on Nov 1, 2016

    @Plamen5kov
    Contributor

    @manijak both the application id and the package name can be configured. Read more about package name and application id. You can change:

    • package name through: app/App_Resources/Android/AndroidManifest.xml and
    • application id throught: app/App_Resources/Android/app.gradle
  11. manijak commented on Nov 1, 2016

    @manijak

    Oh I see, it's the package name I cannot touch. I changed the application id now, and it works. The app is launched in the emulator. Thanks!

  12. Plamen5kov commented on Nov 14, 2016

    @Plamen5kov
    Contributor

    @aplut can you provide steps to reproduce:
    Do you use tns init command to create the application, because you mentioned:

    But somewhere is a bug because I didn't change my package. After creating app during the wizard I have had:
    package.json:
    "id": "pl.test.app_name"

    which leads me to believe you didn't use tns create <appname> command.

  13. Plamen5kov commented on Dec 6, 2016

    @Plamen5kov
    Contributor

    I'm closing this because there's no response for some time now, but anyone feel free to reopen if there are steps to reproduce.

  14. anselmelly commented on Feb 15, 2018

    @anselmelly

    I realized that removing all instances of the nativescript application on an android phone will force the application to compile again even without changing the name of the application

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions