error building android ionic project - android

I'm trying to build an example project from ionic.
When I run the following the code, I get an error:
ionic build android
I get this error ;
* What went wrong:
Execution failed for task ':compileDebugJava'.
Compilation failed; see the compiler error output for details.
Can someone tell me what to do?
Thanks in advance

Please try the following steps:
ionic platform remove android
ionic platform add android
ionic build android

Have you installed the platform? In this working Mac or Windows? If you add ANDROID_HOME mac ?, If you add windows to your PATH location of the SDK?
Config Android_home osx
Config IONIC Android APP WINDOWS

Related

cannot extract APK in IONIC

I have created a mobile application. Angularjs ionic and editor is vscode. then i tried to get apk from the code. sdk was installed externally without android studio. API level that i instaalled in sdk is api level 23(marshmillow).
when i tried to get apk using "ionic cordova build android --release" the output says"
failed to find 'JAVA_HOME' environment variable. Try setting it manually.
[ERROR] An error occurred while running subprocess cordova.
cordova.cmd build android --release exited with exit code 1.
How to solve the Problm.?
here is the Android Home varriable and path vaariables.
How to solve this error.?
Add JAVA_HOME in environment variable.

Meteor Build Failed: "Android target: android: Command failed with exit code ENOENT"

I'm attempting to build my meteor project for android. On attempting to build for android, I get the following error:
I'm not sure how to fix this, any help would be appreciated!
Install the android build tools for the target api version that you are using.

Building an app made with Intel-xdk with Cordova Cli

I'm evaluating Intel-xdk, the idea is using this tool in my IT classes (people from 15 to 18 y.o.), I'm on Ubuntu 16.04 and installed XDK 3759 Linux 32.
A couple of days ago, as I installed an update I also installed nodejs, npm and cordova because as far as june Xdk will no more provide the cloud build service, anyway, after installing android sdk tools, build tools and platform tools, when I try to compile a simple project I've got this error
Error: /home/prof/prova-xdk/platforms/android/gradlew: Command failed with exit code 1 Error output:
/home/prof/android-sdk/build-tools/25.0.2/aapt: 3: /home/prof/android-sdk/build-tools/25.0.2/aapt: Syntax error: Unterminated quoted string
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':CordovaLib:processDebugResources'.
com.android.ide.common.process.ProcessException: Failed to execute aapt
Can someone please explain me the error? May I check my code? But which file? Thanks everybody! Alessandro
I recommend you update to 3900 (hotfix coming very soon to address login and several other issues) and use the "Cordova export" feature to build apps. The ZIP that is generated by that export can be provided directly to PhoneGap Build, using the one free private slot. This will be a much simpler build process than having your students install node, Cordova CLI and the Android build tools.

cordova android build fails with a strange exception

It seems like suddenly my android build for cordova won't work. I get the following message:
.../platforms/android/gradlew: Command failed with exit code 1 Error output:
.../platforms/android/src/org/apache/cordova/media/AudioPlayer.java:529: error: cannot find symbol
What went wrong:
Execution failed for task ':compileDebugJavaWithJavac'.
Has anyone a solution for this?
Looks like you have issue with cordova media plugin. The plugin or the android platform seems corrupted.
Try the following:
Remove android platform
Remove cordova media plugin
Re-add the cordova media plugin
Re-add android platform
Rebuild android platform

Phonegap 3.3 Build Android Failed

I'm trying to build a project but when I type: cordova build android the following error occurred:
Generating config.xml from defaults
for platform "android"
Preparing android project
Compiling app on platform "android"
via command "../platforms/android/cordova/build"
Error: An error occurred
while building the android project.Error executing "ant debug -f "../platforms/android/build.xml"":BUILD FAILED /usr/local/Cellar/android-sdk/22.3/tools/ant/build.xml:932:The following error occurred
while executing this line: /usr/local/Cellar/android-sdk/22.3/tools/ant/build.xml:950:null returned: 1
Total time: 18 seconds
at ChildProcess. < anonymous > (/usr/local/lib/node_modules/cordova/src/compile.js:65:22)
at ChildProcess.EventEmitter.emit(events.js: 98: 17)
at maybeClose(child_process.js: 735: 16)
at Socket. < anonymous > (child_process.js: 948: 11)
at Socket.EventEmitter.emit(events.js: 95: 17)
at Pipe.close(net.js: 466: 12)
Is there a fix for this problem?
EDIT
I used brew to install Android-SDK and installed all possible build-tools:
And my android manifest looks like:
EDIT2
As requested here is the responce for cordova build android --verbose: http://pastebin.com/rqdkVKYG
I found the bug.
While testing, reinstalling android-sdk and ant. I tried to create a new project. Than typed in the terminal cordova build and it build flawlessly. After this I copied my existing WWW folder in to the new project. Typed cordova build again, it gave an error. Now I knew that the bug was in my WWW folder and not in the project itself. Scanning my folders I noticed a file with no extension(hidden files). I deleted the file and tried again. Success!
SUMMARY:
Scan your folders for files without extensions and delete or move them. Cordova doesn't like those.
EDIT
If this doesn't work try:
cordova platform rm android
then reinstall android using :
cordova platform add android
Now try to build.
try to run the command $home/.cordova/lib/android/cordova/3.3.0/bin/check_reqs to check if you have all the required components installed for android.
¿Did you add to windows path the sdk?
You can also try:
cordova platform add android
cordova build
try ant -v in your terminal and make sure it's above 1.8. Cordova requires that.
Also check path is given correct for Ant, Android-SDK/tools, and Android-SDK/platformtools
To debug exact issue try $Cordova build android --verbose
Let me know.

Categories

Resources