Ionic v1 android build error


#1

when enter this command ionic cordova run android
i got this error

cordova run android
Running command: “C:\Program Files\nodejs\node.exe” D:\Ionic\hassan\hooks\after_prepare\010
_add_platform_class.js D:\Ionic\hassan

add to body class: platform-android
Error: Android SDK not found. Make sure that it is installed. If it is not at the default location, set the ANDROID_
HOME environment variable.

i dont know why my project cant build also my ANDROID HOME varible are set.


#2

Run cordova requirements please - it checks if all the required things can be picked up by cordova.
Also post your ionic info output please.


#3

global packages:

@ionic/cli-utils : 1.4.0
Cordova CLI      : 6.0.0
Gulp CLI         : not installed globally
Ionic CLI        : 3.4.0

local packages:

@ionic/cli-plugin-cordova : 1.2.1
@ionic/cli-plugin-gulp    : 1.0.1
@ionic/cli-plugin-ionic1  : 1.2.0
Cordova Platforms         : android 5.0.0
Ionic Framework           : ionic1 1.3.3

System:

Node       : v6.11.0
OS         : Windows 10
Xcode      : not installed
ios-deploy : not installed
ios-sim    : not installed
npm        : 3.10.10

#4

Requirements check results for android:
Java JDK: installed .
Android SDK: installed
Android target: not installed
Android SDK not found. Make sure that it is installed. If it is not at the default location, set the ANDROID_HOME environment var
iable.
Gradle: not installed
Could not find gradle wrapper within Android SDK. Might need to update your Android SDK.
Looked here: C:\Users\talk2\AppData\Local\Android\sdk\tools\templates\gradle\wrapper
Error: Some of requirements check failed


#5

These are quite old and should be updated if you don’t require specific functionality of them.[quote=“hassanabbas, post:4, topic:96893”]
Android SDK not found. Make sure that it is installed. If it is not at the default location, set the ANDROID_HOME environment variable.
Gradle: not installed
Could not find gradle wrapper within Android SDK. Might need to update your Android SDK.
Looked here: C:\Users\talk2\AppData\Local\Android\sdk\tools\templates\gradle\wrapper
[/quote]

Do you have Android Studio installed? If not, you should. This takes care of most of this stuff.


#6


#7

Update Cordova CLI and the platform - otherwise it won’t work with your current SDK installation. Android moved a lot of stuff around internally.


#8

also install every thing.
please mentioned all prerequisite software tool


#9

A post was split to a new topic: Error: Duplicate resources