Ionic run / build not working

2019-02-25 05:06发布

4条回答
再贱就再见
2楼-- · 2019-02-25 05:28

fix is here (FOR WINDOWS ONLY)

I am facing the same problem of Build then i finally found out the solution.

SOLUTION
So You must have the Android Api 23 in order for this command to work.
Error of Daemon process will be solve after installing the Api 23 and extra
build tools and run command
COMMAND : cordova build android --release
I am sure this fix would help you to solve the problem.

STEPS
1. First check the version of android through this COMMAND: cordova platform help
2. Run the build command after installing the Api 23 and extra build tools.
3. If Even this not work then Try add the variable in the
Environment variables > System variables >
add _JAVA_OPTIONS and value = -Xmx512M

Then Run cordova build android --release

BUT FIRSTLY SET UP THE ENVIRONMENT VARIABLES
Environment Variable setup Image
android API 23

COPY FROM HERE
ENVIRONMENT VARIABLES:-

  1. USER VARIABLES
    PATH
    C:\Ruby23\bin;C:\Users\kumar\AppData\Roaming\npm;C:\ANDROID_SDK\tools;%SystemRo ot%\system32; %SystemRoot%; %SystemRoot%\System32\Wbem;

  2. SYSTEM VARIABLES
    ADD NAME AND VALUE
    2.1 _JAVA_OPTIONS -Xmx512M
    2.2 ANDROID_HOME C:\ANDROID_SDK
    2.3 PATH ->
    C:\ProgramFiles\Java\jdk1.8.0_60\bin;C:\ProgramFiles\nodejs;C:\Gradle\gradle-4.0\bin;C:\ANDROID_SDK\tools;%SystemRoot%\system32; %SystemRoot%; %SystemRoot%\System32\Wbem;%SystemRoot%\system32; %SystemRoot%; %SystemRoot%\System32\Wbem;

查看更多
等我变得足够好
3楼-- · 2019-02-25 05:30

I thing the steps below can help, at least you can get a better log, to solve your problem:

  1. Make sure you added a platform to your project

    $ ionic platform add android

  2. Once you have a platform try to run using cordova

    $ cd {YOUR_PROJECT_DIR}/platforms/android/cordova $./run

查看更多
淡お忘
4楼-- · 2019-02-25 05:35

i just got in same kind..! so,just check setup with ionic info command

Your system information:

Cordova CLI: 5.4.1
Gulp version:  CLI version 3.9.0
Gulp local:   Local version 3.9.0
Ionic Version: 1.1.0
Ionic CLI Version: 1.7.12
Ionic App Lib Version: 0.6.5
OS: Distributor ID: Ubuntu Description: Ubuntu 14.04.2 LTS 
Node Version: v5.4.0

i just upgrade cordova version to 5.4.1

this setup,worked for me..!

查看更多
甜甜的少女心
5楼-- · 2019-02-25 05:39

I had the same issue, dropping my version of Node to 4.2.1 fixed it.

See: Ionic run does nothing

查看更多
登录 后发表回答