Ionic build android - FAILS ☹ 😧

OS : WINDOWS 8
ionic: 1.7.13
cordova: 6.0.0
android sdk build-tools: 22.0.1
android sdk platform-tools: 22

I am stuck on :CordovaLib:compileDebugJavaWithJavac
can you please help me :relieved:

Logs are below:

F:\DROPBOX\ionic\myApp>ionic build android
Running command: “C:\Program Files\nodejs\node.exe” F:\DROPBOX\ionic\myApp\hooks
\after_prepare\010_add_platform_class.js F:\DROPBOX\ionic\myApp
add to body class: platform-android
ANDROID_HOME=C:\Users\SonyDaman\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_71
:preBuild UP-TO-DATE
:preDebugBuild UP-TO-DATE
:checkDebugManifest
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:compileDebugNdk UP-TO-DATE
:CordovaLib:compileLint
:CordovaLib:copyDebugLint UP-TO-DATE
:CordovaLib:mergeDebugProguardFiles
:CordovaLib:packageDebugRenderscript UP-TO-DATE
:CordovaLib:checkDebugManifest
:CordovaLib:prepareDebugDependencies
:CordovaLib:compileDebugRenderscript
:CordovaLib:generateDebugResValues
:CordovaLib:generateDebugResources
:CordovaLib:packageDebugResources
:CordovaLib:compileDebugAidl
:CordovaLib:generateDebugBuildConfig
:CordovaLib:generateDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugAssets
:CordovaLib:processDebugManifest
:CordovaLib:processDebugResources
:CordovaLib:generateDebugSources
:CordovaLib:compileDebugJavaWithJavacF:\DROPBOX\ionic\myApp\platforms\android\Co
rdovaLib\src\org\apache\cordova\CordovaInterfaceImpl.java:217: error: cannot fin
d symbol
getActivity().requestPermissions(permissions, requestCode);
^
symbol: method requestPermissions(String,int)
location: class Activity
F:\DROPBOX\ionic\myApp\platforms\android\CordovaLib\src\org\apache\cordova\Cordo
vaInterfaceImpl.java:223: error: cannot find symbol
getActivity().requestPermissions(permissions, requestCode);
^
symbol: method requestPermissions(String,int)
location: class Activity
F:\DROPBOX\ionic\myApp\platforms\android\CordovaLib\src\org\apache\cordova\Cordo
vaInterfaceImpl.java:228: error: cannot find symbol
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
^
symbol: variable M
location: class VERSION_CODES
F:\DROPBOX\ionic\myApp\platforms\android\CordovaLib\src\org\apache\cordova\Cordo
vaInterfaceImpl.java:230: error: cannot find symbol
int result = activity.checkSelfPermission(permission);
^
symbol: method checkSelfPermission(String)
location: variable activity of type Activity
F:\DROPBOX\ionic\myApp\platforms\android\CordovaLib\src\org\apache\cordova\Cordo
vaActivity.java:493: error: method does not override or implement a method from
a supertype
@Override
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
5 errors
FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:CordovaLib:compileDebugJavaWithJavac’.

Compilation failed; see the compiler error output for details.

BUILD FAILED

Total time: 9.639 secs

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug
    option to get more log output.
    ERROR building one of the platforms: Error code 1 for command: cmd with args: /s
    ,/c,“F:\DROPBOX\ionic\myApp\platforms\android\gradlew cdvBuildDebug -b F:\DROPBO
    X\ionic\myApp\platforms\android\build.gradle -Dorg.gradle.daemon=true -Pandroid.
    useDeprecatedNdk=true”
    You may not have the required environment or OS to build this project
    Error: Error code 1 for command: cmd with args: /s,/c,“F:\DROPBOX\ionic\myApp\pl
    atforms\android\gradlew cdvBuildDebug -b F:\DROPBOX\ionic\myApp\platforms\androi
    d\build.gradle -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true”

F:\DROPBOX\ionic\myApp>

hi , sonydaman.
am also facing same error here …
did u resolve it …
if yes let me know how u did it …

Hi vishwastn2
Yes its resolved now Actually i am using windows 8 and i changed default language English to hindi
Thats why i getting this error once i changed it from Hindi to English
After that i am able to update ADT bundle also.

Having the exact same issue.

thanks sonydaman,
actually i din’t get tat ,
can u elaborate it …
am using windows 7 in my machine …
i changed language to Hindi from English in control panel.

even though am getting same error ,
can u help me in this …

thank u .

Anyone got solution for this?