Updated command to start blank project with ionic2 and angular2? - android

Trying to create blank project with ionic2 not ionic1 or ionic3 using the below command in terminal
ionic start SqliteDemo blank --type ionic2
Error comes as below:
✔ Creating directory ./SqliteDemo - done!
✖ Looking up starter - failed!
[ERROR] Unable to find starter template for blank
If this is not a typo, please make sure it is a valid starter template
within the starters repo: https://github.com/ionic-team/starters
what i have tried ?
ionic start SQliteDemo blank --v2
not worked
all above commands just create Folder for the given name and nothing is inside.
Actually Trying:
I need to work with sqlite storage/ with any android native api's, as first attempt i try to do a sample project based on sqlite so that i can add android platform to this project and open with Android-Studio and check whether the .db file is created and working or not using Android-Monitor. If any references for this question will be very much appreciated.

Related

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'.

Vue cli on android

I use a mouthstick to opeate by android tablet(since i am paralysed and cant use a laptop)..
I know front end development and wanted to learn Vuejs2.
So i need to use the CLI that Vue js offers i.e vue-cli
So for the command line interface i downloaded the termux app from play store which is a terminal for Android and file with many Linux packages
Using this i installed nodejs and vue-cli
But for the next step to proceed i ha Ave to execute the command
npm install
And then
npm run dev
The vue-cli is getting installed without any errors but running the npm run dev is giving many errors in the terminal and the app is not being started
What shall i do?
Tried same with learning angular 2 but same issue
Any help and suggestions are appreciated
I ran into a similar problem. It turned out that I had created my project in a directory out side the "storage" directory created by Termux. I don't know the details as to why, but apparently that was the problem. I re-created the vue project in a directory underneath the "storage" directory and those problems resolved. I still haven't gotten the project to run, though. Now I'm getting a single error about an unhandled promise rejection. Still researching that one...

Ionic Build or Ionic Run builds the wrong app

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

Android Library Project with React Native

I'm currently struggling a bit with react native.
What I want to have is a library project based on react native which I can then include in some of my apps.
First thing I tried was to move all the basic react setup code [1] into a Fragment inside an existing app. This worked without any problems.
Then I started a completely new Android project with an empty Activity.
Into this project I added a new Android Library project module which should contain the "react native fragment". I initialised the react native project in my root project folder then.
My current project structure looks like this:
ReactApplication
- basic files (index.android.js, index.ios.js, package.json, build.gradle, settings.gradle)
- app/ (contains the real native android app which includes the "react native fragment")
- reactlib/ (library project which contains a fragment with the code from [1])
- ios/
- node_modules/ (contains react-native)
Starting the dev-server via npm start works without any problems but as soon as I start the Android app I get the folowwing logcat outputs:
W/unknown:React(26957): Unable to dispatch keyboard events in JS as the react instance has not been attached
W/unknown:React(26957): You seem to be running on device. Run 'adb reverse tcp:8081 tcp:8081' to forward the debug server's port to the device.
E/(26957): Unable to load script from assets: index.android.bundle
E/ReactNative(26957): Got JS Exception: ReferenceError: Can't find variable: require
Please note that I did the adb reverse tcp:8081 tcp:8081 thing and the error is still showing up.
Later I want to create an aar out of the Android Library project and access it via maven.
What am I doing wrong? Or is what I want to do simply not possible?
[1] https://facebook.github.io/react-native/docs/embedded-app-android.html#add-native-code
After debugging and trying out couple of things, i figured that it fails to load the bundle file from server when bundled in aar.
If you add index.android.bundle in android assets folder, it starts working.

Build Phonegap 3.1 app locally for android

I started PhoneGap today only. I have experience with native code but not with HTML5 stuff. I am comfortable with GUI so CLI is new to me.
So I am trying to build app in android. But it uploads data to remote site & as its my second app, Its says "Private app limit reached".
Is there any way to build file locally?? Like with no internet connection. Screenshot attached for further refrence. Thankyou in advance
If you look at the Android platform guide section of the PhoneGap documentation you'll get instructions for setting up your SDK locally.
Pay attention so that you got your PATH setup correctly, a quick way to verify that on windows is to type echo %PATH% in the command prompt. If you already had your command prompt open as you set PATH it'll not be reflected so you've to close cmd and open it again.
After the SDK is setup successfully and you got your PATH verified you should be able to do the following to run it:
phonegap install android
phonegap local build android
phonegap local run android --emulator

Categories

Resources