error while building phonegap app using ionic - angularjs

I need to build an phonegap app using angularjs .
so i choose ionic framework.
these are the steps, I have done so far.
set up java,ant, adt and their path.
install ionic using command
npm install -g ionic
start ionic project uisng
ionic
ionic start ex1
add ionic platform
ionic platform add android
build using command
ionic build android
But doing building, it shows error.
BUILD FAILED
C:\Android\adt-bundle\sdk\tools\ant\build.xml:932: The following error occurred
while executing this line:
C:\Android\adt-bundle\sdk\tools\ant\build.xml:950: null returned: -1073741819
Total time: 11 seconds
C:\Android\fresh\platforms\android\cordova\node_modules\q\q.js:126
throw e;
^
Error code 1 for command: cmd with args: /s,/c,ant,debug,-f,C:\Android\fresh\pla
tforms\android\build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen
I hadn't modified any code still. and apache ant and java are also working. Why this error?
the contents in C:\Android\adt-bundle\sdk\tools\ant\build.xml is added below
line 930 <target name="-package-resources" depends="-crunch">
<!-- only package resources if *not* a library project -->
line 932 <do-only-if-not-library elseText="Library project: do not package resources..." >
<aapt executable="${aapt}"
command="package"
versioncode="${version.code}"
versionname="${version.name}"
debug="${build.is.packaging.debug}"
manifest="${out.manifest.abs.file}"
assets="${asset.absolute.dir}"
androidjar="${project.target.android.jar}"
apkfolder="${out.absolute.dir}"
nocrunch="${build.packaging.nocrunch}"
resourcefilename="${resource.package.file.name}"
resourcefilter="${aapt.resource.filter}"
libraryResFolderPathRefid="project.library.res.folder.path"
libraryPackagesRefid="project.library.packages"
libraryRFileRefid="project.library.bin.r.file.path"
previousBuildType="${build.last.target}"
buildType="${build.target}"
line 950 ignoreAssets="${aapt.ignore.assets}">
<res path="${out.res.absolute.dir}" />
<res path="${resource.absolute.dir}" />
<!-- <nocompress /> forces no compression on any files in assets or res/raw -->
<!-- <nocompress extension="xml" /> forces no compression on specific file extensions in assets and res/raw -->
</aapt>
</do-only-if-not-library>
</target>

Finally i have solved this issue, ie the error -1073741819 . this is due to bug in aapt.exe file build-tools in sdk for windows users.
Replace the aapt.exe file with this file https://android.googlecode.com/issues/attachment?aid=776290120000&name=aapt.exe.zip&token=ABZ6GAcRj6lR-sOmUyVguB0Gmf_BI4Z7Gg%3A1415016896298
for more information, Check this page
https://code.google.com/p/android/issues/detail?id=77629

Related

ExtJS - Unable to locate supported Framework

Downloaded Ext JS Enterprise* Edition for MacOS Catalina. Unzipped the file and executed the SenchaCmd-7.2.0.66-osx.app which installed the CMD tool.
The instructions to generate the application documented here states the following:
Generate the application using the following command:
sencha -sdk /path/to/downloaded/sdk generate app modern MyApp ./MyApp
what is the /path/to/downloaded/sdk?
Tried several different paths but always get the following error:
Unable to locate 'framework.dir' property from sencha.cfg and no framework directory specified
[ERR] Please ensure this command was executed from a valid framework directory
[ERR] No Framework specified.
Please help!
could not get the zip download and CMD to work. Used the NPM option to download and make new app.

Sencha CMD, upgrading from 6.0 to 6.1 IndexOutOfBoundsException

I'm trying to sencha app build with Sencha CMD 6.1.1.76 but I'm getting:
BUILD FAILED
[ERR] java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
[ERR] at com.sencha.command.BasePluginCommands$BasePluginCommand.doExecute(BasePluginCommands.java:97
[ERR] )
and not much else : /
this project was previously built using 6.0.0.92
but I don't see that specific one on sencha's cdn http://cdn.sencha.com/cmd/6.0.2.14/release-notes.html
I don't think I'm the only one with this issue: https://www.sencha.com/forum/showthread.php?309457-IndexOutOfBoundsException-when-running-sencha-app-build-testing&p=1131708#post1131708
Has anyone been able to overcome this issue ?
running sencha app upgrade is of no help, ExtJs 5.0 is using in this project.
Also I get a different exception but the same task originates it (slice-images within slice-impl.xml)
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.BasicException: Java heap space
[ERR] at com.sench
[ERR] a.cli.Command.dispatch(Command.java:43)
[ERR]
[ERR] Total time: 30 seconds
[ERR] The following error occurred while executing this line:
/Users/code4jhon/thellookingglass-git/.sencha/app/build-impl.xml:335: The following error occurred while executing this line:
/Users/code4jhon/thellookingglass-git/.sencha/app/slice-impl.xml:370: The following error occurred while executing this line:
/Users/code4jhon/thellookingglass-git/.sencha/app/slice-impl.xml:371: The following error occurred while executing this line:
/Users/code4jhon/thellookingglass-git/.sencha/app/slice-impl.xml:240: com.sencha.exceptions.BasicException: Java heap space
I have tried increasing the heap size on some configuration files but no luck.
So this is the workaround I found in order to be able to:
a) generate the css file on the build process
b) run all the other tasks from the build process.
Ultimately I found that the line causing this issue was:
ext.dir=${workspace.dir}/ext
that was on
.sencha/workspace/sencha.cfg
After removing that line I was able to run sencha app build and generate the proper css file.
And the index and resources on the production folder looked good but I got some issues on the regular index ... wrong references etc so looks like I needed that configuration.
ext.dir=${workspace.dir}/ext
So to overcome this I just backed up my .css file and then set:
#comment out this line
#ext.dir=${workspace.dir}/ext
skip.slice=1
in .sencha/app/sencha.cfg
This is the only way I have found to:
1 build the project
2 update the .css with a different theme.
UPDATE
This is generating an 'extjs trial' water mark on the components so it is not useful ...
What I usually do in cases where I'm using an older version of the framework is install the corresponding Sencha Cmd version.
In this case the Sencha Cmd version 6.0.0.92 is probably a beta version as is seen in the release notes:
Release Notes for Sencha Cmd 6.0.0 Beta
Date: May 22, 2015
Version Number: 6.0.0.154
So this is probably going to be difficult.
Is it possible to run sencha app upgrade --noframework. I know it is a ExtJS 5 application, but this only updates the Sencha Cmd configuration files. You can merge your changes easily afterwards and with some luck it'll work with Sencha Cmd 6.1.x.
If this doesn't work, please run sencha -d app build. This will generate an enormous amount of information, but it might give some hints to the exact cause. You can use sencha -d app build >build.log to create a log file.
Good luck, Sencha Cmd problems can be difficult to debug.

ionic build fails error 65

Building my ionic app fails since this weekend:
** BUILD FAILED **
The following build commands failed:
CompileC build/App.build/Debug-iphonesimulator/App.build/Objects-normal/i386/IonicKeyboard.o App/Plugins/com.ionic.keyboard/IonicKeyboard.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/me/Documents/app/platforms/ios/cordova/build-debug.xcconfig,-project,app.xcodeproj,ARCHS=i386,-target,app,-configuration,Debug,-sdk,iphonesimulator,build,VALID_ARCHS=i386,CONFIGURATION_BUILD_DIR=/Users/me/Documents/app/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/me/Documents/app/platforms/ios/build/sharedpch
OSX 10.11.3
XCode 7.2.1 (7C1002)
ionic -v
1.7.14
Today I reinstalled cordova and ionic, but I still keep getting the error. I had to adjust another issue with macports (here), which I fixed by setting the rights right, but still keep getting the above error.
Error 65 seems to have originate from within Cordova plugins. I've been able to "band-aid" this issue by:
cordova plugin remove <plugin name>
ionic platform remove <os>
ionic platform add <os>
cordova plugin add <plugin name>
I've also tried using sudo while running these commands with mixed results.
I fixed with following steps
in xCode go-to "Build Phase" >> Under "Compile Sources" >>
did you notice any missing or .m files failed to link... in my case it was "IonicKeyboard.m" file
I just added the file to the list "plugins/cordova-plugin-ionic-keyboard/src/ios/IonicKeyboard.m"
then Build Project - worked
iOS
Open platforms/ios on XCode
Find & Replace io.ionic.starter in all files for a unique identifier
Click the project to open settings
Signing > Select a team
Go to your device Settings > General > DeviceManagement
Trust your account/team
ionic cordova run ios --device --livereload

Why does Sencha CMD build fail with PhantomJS error code 2?

Problem: "Error capturing theme" while building Sencha CMD workspace application for sub-project A (has source files), but sub-project B (no source files) builds fine.
Scenario:
Created new Sencha workspace (CMD 5.1.0.26) and added a new project A.
Project A builds fine (sencha app build -c production)
I add a main view and reference a module contained in a common folder (/project/common/js/).
sencha app watch works fine however sencha app build -c production now fails on Project A.
To sanity check, I generate a new application inside my framework folder, referencing the same ExtJS version (5.1.0.107), let's call it project B, and it builds just fine.
Project A is still failing with this error:
[INF] Writing content to /MyWorkspace/ProjectA/sass/example/bootstrap.json
[INF] Writing content to /MyWorkspace/ProjectA/sass/example/bootstrap.js
[INF] Capturing theme image
[ERR] loading page /MyWorkspace/ProjectA/sass/example/theme.html
== Unhandled Error ==
TypeError: '''undefined''' is not a function (evaluating '''Ext.require([
'''Ext.layout.Context'''
])''')
file:///MyWorkspace/ext/packages/ext-theme-base/sass/example/render.js:7
[ERR]
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.ExProcess: phantomjs process exited with code 2
[ERR]
[ERR] Total time: 46 seconds
[ERR] The following error occurred while executing this line:
/MyWorkspace/ProjectA/.sencha/app/slice-impl.xml:306: The following error occurred while executing this line:
/MyWorkspace/ProjectA/.sencha/app/slice-impl.xml:307: The following error occurred while executing this line:
/MyWorkspace/ProjectA/.sencha/app/slice-impl.xml:163: com.sencha.exceptions.ExProcess: phantomjs process exited with code 2
Workaround:
I've prevented the error for now by editing sencha.cfg and adding the line:
skip.slice=1
However files in /MyWorkspace/ProjectA/sass/ are the same between the failing Project A and Project B with the exception that the content differs slightly in files that reference the application names, but that is all.
The ExtJS files are few enough that I've done a manual walk through of the differences, with the exception of bootstrap.json which didn't lend itself to anymore than a visual skim.
I'd be most interested if anyone has pointers as to what is likely missing or different between these projects that appears to be causing part of my framework to be missing when it's needed in evaluating line 7 of render.js.
Let me know if you need more supporting information. Thanks!
While building extjs application we have got this error
com.sencha.exceptions.ExProcess: phantomjs process exited with code 1
Solution:
We downloaded the latest version of phantomjs from here and replaced the phantomjs.exe file with cmd
phantomjs.exe "cmd/bin.windows/phantomjs/phantomjs.exe"
It worked for us.

generate sencha touch application

i got this error after using sencha generate commande
C:\Users\usr\bin\Sencha\Cmd\3.1.2.342>sencha generate app senchapp "C:\Users\usr\Desktop\senchaapps"
error after creating senchaapps directory :
[INF] generate-workspace:
[INF]
[INF] -after-generate-workspace:
[ERR] Unable to locate 'framework.dir' property from sencha.cfg
[ERR] Please ensure this command was executed from a valid framework directory
[ERR] Non-framework directory
actually, the sencha command should be run from the framework directory (touch-x.x.x folder) rather than the cmd directory. With your terminal, go inside this framework folder and then run this command:
$ sencha generate app nameOfYourApp ../Path/or/your/app
hope this will work.
Maybe the problem could be that you not set the SDK path:
sencha -sdk ../bin/Sencha/touch-2.3.1/ generate app App .

Resources