Problem compiling Ionic (Angular) app in Android - android

I have an app made in Ionic5 framework with the support of Angular, when I run ionic serve --lab, the android app works without problem but the problem is that when I export the project to Android Studio with (ionic capacitor copy android) and I run the app on my device suddenly crashes and stops.
I have been looking for information but I have not found any useful data. My question is more generic than this platform is used to. What error detecting techniques I should use (Android Studio, npm vulnerabilities) and what are some typical cases that generate this error?
I let some posible useful project data:
I use Firebase for database and back-end services.
NPM warn me due to the fact that I have 10 vulnerabilities.

Ther could be a number of reasons for this.
Try running opening chrome://inspect/#devices where you can select your device and see all console logs.
Also try syncing your gradle files in android studio

Related

Problem initializing project in ReactNative CLI

My name is fernando and I'm studying mobile development via React Native
I'm having trouble using the React Native CLI, as I couldn't solve this problem I decided to do all the steps from the recommended https://reactnative.dev/docs/environment-setup again to run the code.
I uninstalled Java, node, Android Studio, JDK and gradle.
I installed Java, Node and Java using Chocolatey as recommended by the documentation, I strictly performed all the steps requested but I cannot install the application on the simulator or on the cell phone via USB
Starts NPM START normally without errors.
But when starting NPM RUN ANDROID it gives me the following error
enter image description here
OBS:
The project in question in the image, has no code, it was only opened using npx react-native init AwesomeProject
Another observation that I can run and program using React native EXPO GO
It works without errors and I can run both in the simulator and in USB
Thank you and I would appreciate it if someone could help me

Ionic2: This app isn't compatible with your phone

After installing my Ionic2 app on real device, it became slow - which wasn't while testing on browser during development. Then I came across Crollwalk, a tool/plugin to enhance Hybrid app performance on device.
I then generated an .apk and attempted to install on real-device, only to get the error "This app isn't compatible with your phone".
After few Bing/Google searches, I got to know that the project was last supported for WebView on Cordova 6.3 at the Crosswalk Project official website.
My dev env is
Cordova: 6.5.0,
Ionic: 2.2.3
How do I downgrade Cordova to the supported version of Crosswalk without affecting Ionic and the project it self?
Thanks for your usual assistance.
Finally, I got a walk-around!
I had to create build-extras.gradle file and added cdvBuildMultipleApks=false to it. That now generated a single unsigned apk file (instead of armv7 and x86 respectively) which I signed & was able to launch the app!
Before then, I used to sign the android-x86-release-unsigned.apk.
Thanks to building-combined-armv7-x86-apk-after-crosswalk-integration-in-an-ionic-project

How to set proper version control for Ionic project

We're working in an app for Android/IOS and the team has at least 3 people working in the app code and who need to have the app running locally in their particular env, someone is developing over Mac OS to eventually build to iOS and the others are on Windows machines.
We've been experiencing problems with the Ionic project after installing ngCordova, some cordova plugins and the ionic-platform-web-client, the mac machine had the app running beautifully and the windows instances were broken complaining that: Module 'ionic.service.core' is not available!
We don't know which particular step caused the code inconsistency and after several hours of looking around to fix it we decided just to create a new Ionic project and copy our specific www code inside. Since we don't want that to happen again we need to figure a reliable method of keeping all platforms working right after we install a plugin or add an Ionic service.
Could this be accomplished only by gitignoring www/lib folder and platforms, and then running bower install in each dev machine after a new module have been added to the project? or is it more complex than that and we're omitting some important steps to allow the project collaboration without these kind of issues?
Yes, you can put platforms in your .gitignore. I personally wouldn't be putting www/lib folder there, though.
Also, I would strongly advise that on all the machines where you're building the apps locally you have the same version of Ionic and Node.

cordova/ionic app crashes after startup on older versions of android

The app runs fine on ios and android 4.4+ and lollipop. However on older android versions (e.g 4.1.1) the app crashes directly after I start it.
Full stacktrace her is the logcat stack trace on such a tablet (Not sure which piece I had to copy) here the link
The exception is rather vague.
Thank you!
android 4.4+ use chromium as default browser, while any version below use android-browser.
It is much weaker browser. If your app runs perfectly in ios or android-4.4, then this could be the reason.
one work around is to use crosswalk by intel. cordova-crosswalk. Read More.
Basically it wraps your app in chromium browser, and package it as android app.
when the app run, it run chromium first( instead of android-browser) and then the code inside of it.
noticable cons is extra 15-20mb to your app filesize.
to migrate from cordova to crosswalk cordova. read More.
In the recent update, it seems there is new command to migrate app automatically.
But what i did previously, was to do manual migration (by copy paste).
> few Tips if you do manually:
> 1. create new crosswalk project from cli
> 2. copy files in **www folder in cordova** to **www folder in crosswalk**
> EXCLUDING one file : config.xml
> 3. Install your plugin manually. Read More: http://goo.gl/wF4CmD.
> 4. in crosswalk,set the config.xml manually.

Difference between PhoneGap and Cordova and which one should we install?

I have been tasked with developing an Android and iOS application with PhoneGap (http://phonegap.com/)
However, as I read, things start to get really complicated: Some people say Cordova (http://cordova.apache.org/) is now PhoneGap, others say PhoneGap is just a distribution of PhoneGap.I lost 3 days and still can't find a proper way or a guide to install a fully functional PhoneGap plugin either in Eclipse or Netbeans running Ubuntu 12.04 64-bit.
What I tried:
1. Installing Eclipse, installing MDS AppLaud Phonegap Plugin (http://marketplace.eclipse.org/content/applaud-phonegap-android-jslintjshint#.Utf1JPiSTh8). This one actually installed at once, and it actually lets me create a new PhoneGap project in Eclipse, however, the I cannot select any SDK different than 4.4. (?!)
2. Installed NetBeans and after I tried to install phonegap and cordove through nodeJS it failed, again.
My question is:
Which one I should install and how to do it in Ubuntu, using either Eclipse of NetBeans?!
Edit:
OK guys, I just found out how to install nodeJS and PhoneGap on Ubuntu 12.04: http://paste2.org/1OnX6M6F . Still trying to integrate it in some IDE for the real thing, though!
If you want to basically start developing an app, I suggest this for PhoneGap:
These are the steps I used to install PhoneGap on Ubuntu. Take note, this is for PhoneGap version 2.8.1. Personally I was not able to get nodeJS to install the latest. If you need the latest to be installed, check around on google. Referencing This tutorial.
Step 1
Install Java 7 JDK
Step 2
Install ANT
Step 3
Download & Extract PG v2.8.1
Step 4
Download Android SDK
Step 5
Set up environment variables
Step 6
Create base project
./create location/to/put/project package_name project_name
Step 7
Import Project into Eclipse
File->New->Android->Android Project From Existing Code
Browse to where you placed the project and select it
Now you can start developing.
Reminder: This is the way to do it for v2.8.1 of PhoneGap. Different versions(especially 3.*) will be different (nodeJS)
Look at http://docs.phonegap.com. Read the "Overview chapter, then "Platform Guides" and "The Command-Line Interface". Follow the steps and in the end you should be able to build your app. It takes a while but it's worth it.
I havn't integrated cordova/phonegap in my IDE. I just created the app with the command line interface. In netbeans I created a HTML5 project and linked the app-root/www directory into this project. I'm programming with Netbeans and building and running the app with the command line interface. That's all.
In order to have some code completion, I have written an extra class (facade) which encapsulates the phonegap code. It just delegates its calls to the phonegap API. That is especially nice if the phonegap API changes as it only affects my code in that particular facade class.
The last thing I want to share: I found out that the build and run process with the command line interface is pretty slow. Executing cordova prepare android and then running the android project in Eclipse/ADT is a lot faster.
OK, to put it simple:
PhoneGap - The original project developed by volunteers
Cordova - The Apache's version of Phonegap, which has exactly the same documentation and functionality as the original PhoneGap but is integrated in NetBeans 7.4.

Categories

Resources