This is a migrated thread and some comments may be shown as answers.

App works in simulator, works when deployed to device, but then the "published" apk does not work.

3 Answers 722 Views
Android Devices
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Denise
Top achievements
Rank 1
Denise asked on 09 Mar 2015, 08:54 AM
I just finished my app!  So I went through the steps in appbuilder to publish it (starting with the Windows store and Google Play).
The windows deployment seems to have gone fine... but not the Android one.

Soon after the app was published on Google Play I naturally downloaded it to my phone, and found that there was no interactivity at all.  The app does open: the first page comes up, but then there is no responsiveness to touch.   My phone is a very old phone (HTC Thunderbolt running Android 4.0.4) and it is pretty slow, but I don't think that was the issue.  After all, this exact same app ran fine when I deployed the dev version to the phone with appbuilder.

I also tried "side-loading" the production apk onto the phone directly, and got the same result, so I don't think it is the packaging on Google Play that is at fault.
When I attempted to use adb and load the apk into an emulated device, it froze --- I haven't figured that out yet.

So my questions:
Does anybody have any idea why the "production" apk would be broken when the dev apk works?
Does anybody have any pointers to how to debug what is wrong?

FWIW: app is JQuery 2.1.3 + Cordova 3.7(Geoloc & internet plugins only).   The actual apk is here, in case that is any help: https://dl.dropboxusercontent.com/u/81409830/NextFerry.apk

3 Answers, 1 is accepted

Sort by
0
Denise
Top achievements
Rank 1
answered on 10 Mar 2015, 04:44 AM
Update: I was mistaken in my post above: it is not the debug vs. production apk that is the problem.  I have the same problem when deploying the debug apk to the phone.
Most likely the issue is that I recently re-started work on the app, and upgraded to the new version of appbuilder and cordova.   Possibly/probably there is something in my code that is incompatible.   It does work just fine in the simulator though.  I will continue to debug.
0
Martin Yankov
Telerik team
answered on 11 Mar 2015, 12:42 PM
Hello Denise,

Here are some ideas on what could be wrong with your project:

 - Some source files are not referenced in your project. This would explain why the app works in the simulator. The simulator runs locally and gets the files from the folder. The build on the other side is executed based on the files referenced in your project file. You can check these files when you open your project and check if all files are listed in the Project Navigator/Solution Explorer.

 - The fact that this happens on Android only, leads me to the idea that there might be a problem with the Android permissions. Go to your Project Properties -> Android -> Permissions and check if some of them are off and you need them turned on. I would check the INTERNET permission first as it usually is the problem. You can also take a look at this article as it explains the Android permissions and why do you need them.

These are only ideas. If you open a support ticket and send us your project, we can take a look and investigate what is causing the issue.

Regards,
Martin Yankov
Telerik
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
0
Denise
Top achievements
Rank 1
answered on 13 Mar 2015, 05:24 AM
Martin ---

Thank you for the suggestions.   I started over with a "new" project and added code to it, and bit by bit built all the original functionality back.  At this point, the only thing I haven't changed for the Android version are the icons, splash screens etc.   Weirdly, the new project works, the original project doesn't.    

I will open a support ticket with the two projects and see if someone can help me sort it out.  (Of course I may just switch to using the new project, too.)   FYI, I'm attaching a pic of the two .abproject files, side by side with the differences highlighted --- you can see there isn't much.
Tags
Android Devices
Asked by
Denise
Top achievements
Rank 1
Answers by
Denise
Top achievements
Rank 1
Martin Yankov
Telerik team
Share this question
or