Ionic Build or Ionic Run builds the wrong app - android

I am trying to build or run an Ionic Cordova App. But it always builds a default app with playlists.
OS is Windows 10
I do the following from my command prompt:
c:\users\martijn\documents\ionic start testapp blank
c:\users\martijn\documents\testapp\ionic run android
now it is building a different app then in my app directory. When I do ionic serve I see the right app in my browser. Can't figure out why running or building gives me a different app, I think it is a default example app.
Can somebody help?

See link here:
https://github.com/driftyco/ionic-cli/issues/1283
Appears you may have to delete the the last apk file from platforms\android\build\outputs\apk

Related

How to set up an existing React-Native project from a new computer for the first time?

So I recently started working with my friend on his app project and I've had trouble building his react-native based project. It's both ios and android.
On android, I can get as far as building, but when I run the app shuts down instantly or shows a red screen with some firebase error.
On ios, I get a build error.
My question is: what do I need to install when I first pull the repo from github? I run '''yarn install''' straight away and run '''pod install''' from the ios folder but that isn't enough. Anything I should run for android more than the yarn install command I had already used?
Thanks!
It seems your development environment is not set up yet. Follow this link to set up your environment.

Ionic cordova run android and update file from folder

I would like to be able to upload/update files from my local machine using real device android.
I've wrote this command line :
ionic cordova run android
from my ionic project folder.
I can see my app on the real device but when i update a file from the project folder, i can't see the result in the real device.
If i want to see the change i have to re-run android.
Is there a way without android studio to be able to see the changes after editing a file in the ionic project'folder ?
You need to build every time on mobile, you can run your application on browser if you want to see the results after editings.
Finaly i had to run this command and the local machine folder reflect the real device app :
ionic cordova run android --livereload -cs

React Native 0.55.2 Android looks for index.android.js

I am currently using React Native 0.55.2 for my project and I am trying to integrate the React Native Navigation from wix into my native projects (both ios and android). I followed their instructions in the website and successfully set it up for ios (it was able to build and run successfully in the emulator). I was also successful in building it for android (see image, I used npm run android), however, when I run it on the android emulator, the image below pops up. I don't know why it tries to look for android.index.js even if my react native project is setup for the latest one which only needs 1 index file which is index.js
Build Success (npm run android):
Android Emulator Error:
Not sure my answer can resolve your problem but normally if I hit this error, I will follow below step:
Clear cache
Close the terminal and uninstall my app, simulator
Delete folder node_module and run yarn again (optional)
Run react-native run-android
my version: 55.4
Check the Java files of the android project, like Main Application.java or MainActivity.java. They contain a method that returns the bundle file name and you'll see it contains 'index.android' instead of 'index'.
You should be able to find this place easily also by using 'git grep'.

Nativescript app deploys, but doesn't appear on device

I'm just starting to learn Nativescript, cause I want to develop an app version of a site I made. I went through their tutorial, and had no problems there. Then I created my own app using tns create and then added the Android platform using tns platform add android. Then I created a few pages, and tried to run it with tns run android, and it will successfully build and says it's deployed on the correct device (either Genymotion or my S6), but the app will not show up at all.
I tried creating another app with the basic template tns create makes, and running just that as is, and that won't show up either. The sampleGroceries tutorial app continues to show up though.
What could I be missing?

Getting gap_init on new apache cordova install when viewing android app in browser

I just recently installed apache cordova and am trying to get it up and running properly. I'm using a macbook pro running 10.9.5. My android SDK is the latest (22, but android target build uses 21). The cordova version is the latest as well (4.3). This issue occurs with any example app that I've tried, including the basic app/page that gets installed when you create a new cordova project (i.e. cordova create...).
For the most part, everything seems to be working ok, with one exception. When I try to view the android version of the test app in a browser (any browser - tried chrome, firefox, safari), I get various prompts that show up on the init/load of the app. The first prompt window to popup up says "gap_init:2", which is generated from the androidExec function in the cordova.js file:
androidExec.init = function() {
bridgeSecret = +prompt('', 'gap_init:' + nativeToJsBridgeMode);
channel.onNativeReady.fire();
};
If I cancel thru these prompts (there are 3 prompt windows), then the app seems to load ok. If I 'ok' thru these prompts, then the app gets into an infinite cycle of processing empty messages, and I have to kill the browser processes to stop it.
The iOS version of the app loads fine in every browser. I've tried changing the android target to version 19, but the prompts still occur. There are no error messages during the build process.
Does anyone have any insight into what might be causing this? How is this prompt message supposed to be caught/handled?
Its simple, from visual studio, on running, it opens web pages for Android /iOS environment, you would have tried to cut-short the url to open for web version, this is when you will get dialog's as you mentioned.
To overcome this problem map the www folder to your local iis / iis express and open the url, page will open without any error.
This error you get when you use the following command directly as follows:
ionic serve
and then followed by
ionic cordova build android --prod --release
I SUGGEST TO FOLLOW THIS METHOD, IF YOU WANT TO RUN THE APP IN BROWSER
ionic serve
ionic build
ionic build --prod
This way you get www folder where you can upload to server and check the whole app in browser directly

Categories

Resources