iOS & Android run problems


#1

Hey,

I’ve got to many errors on my Ionic app which has dropped suddenly.
I tested to remove platforms, remove ./node_modules, and reinstall Xcode & Android Studio but It still not working.

I have to deploy my app this weekend so I’m very stress and nervous about this problems :disappointed_relieved:

On iOS:

The following build commands failed:
	Ld build/emulator/Enosis.app/Enosis normal x86_64
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/nicolasfevre/Desktop/app-ionic/platforms/ios/cordova/build-debug.xcconfig,-workspace,Enosis.xcworkspace,-scheme,Enosis,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone X,build,CONFIGURATION_BUILD_DIR=/Users/nicolasfevre/Desktop/app-ionic/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/nicolasfevre/Desktop/app-ionic/platforms/ios/build/sharedpch

[ERROR] An error occurred while running cordova run ios (exit code 1).

On Android:

ANDROID_HOME=/Users/nicolasfevre/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home
No target specified and no devices found, deploying to emulator
Error: No emulator images (avds) found.
1. Download desired System Image by running: /Users/nicolasfevre/Library/Android/sdk/tools/android sdk
2. Create an AVD by running: /Users/nicolasfevre/Library/Android/sdk/tools/android avd
HINT: For a faster emulator, use an Intel System Image and install the HAXM device driver

I don’t understand my Android’s error because I’ve created an AVD :confused:

Thanks in advance for your answer…and sorry for my broken english.


#2

Is ionic cordova requirements happy?
What is your ionic info output?


#3

I see you have Android Studio installed.
Can you open Android Studio, start a new project with an empty activity and start it by pressing the green play button? If there’s something wrong with your created AVD Android Studio will most likely notice that right then. While your empty activity Android app is running in emulator, run your ionic app and see if it then finds your AVD.
Android Studio 3 went stable just a day ago or something but still takes a few updates in while running an android app. Make sure everything is up-to-date there as well.


#4

Thanks for you answer!

@Sujan12
I resolved my iOS problem! (checkout to an other commit and It works).

My ionic info is:

cli packages: (/Users/nicolasfevre/Desktop/app-ionic/node_modules)

    @ionic/cli-utils  : 1.15.2
    ionic (Ionic CLI) : 3.15.2

global packages:

    cordova (Cordova CLI) : 7.1.0 

local packages:

    @ionic/app-scripts : 1.3.7
    Cordova Platforms  : android 6.3.0 ios 4.5.2
    Ionic Framework    : ionic-angular 3.7.1

System:

    ios-deploy : 1.9.2 
    Node       : v8.8.1
    npm        : 5.4.2 
    OS         : macOS High Sierra
    Xcode      : Xcode 9.0.1 Build version 9A1004 

Environment Variables:

    ANDROID_HOME : not set

Misc:

    backend : pro

Maybe cause of ANDROID_HOME : not set ?

@nathantaal I already tested what you say. The empty project starts in emulator…but it’s sill not working for my project.
My Android Studio is up to date.


#5

Well android_home not being set is a problem for sure, crazy thing is that android studio does work. Try to set android home to your path and see what it does.
I assume you don’t own any Android devices, but can you build an actual APK file? Since you’re in a hurry, you can drag the build APK file inside the emulator and then it will install. This does not fix your problem for now but you will be able to test (Without livereload thought)


#6

No idea, that is what running ionic cordova requirements is for. It will give useful output.

That might be the problem, as Cordova only really works with 2.3.3 for now, not 3.0.


#7

Ok @Sujan12:

Requirements check results for android:

Java JDK: installed 1.8.0
Android SDK: installed true
Android target: installed android-27,android-26,android-25
Gradle: installed /Applications/Android Studio.app/Contents/gradle/gradle-4.1/bin/gradle

Ok tomorrow I will downgrade to 2.3.3 :slight_smile:


#8

Working fine over here with Android Studio 3


#9

hi sir first
you need to install the pre requisite for android
like java jdk/ android sdk.
i’ve been creating andorid app with ionic many times. so im pretty sure it will work if you install the pre-requisite
then about ios i never tried it.


#10

Java JDK & Android SDK are already installed.

Maybe cause by this line:

HINT: For a faster emulator, use an Intel System Image and install the HAXM device driver