Phonegap back button control - android

I'm trying to get the back button to go to the home screen and keep the app open in the background but I can't seam to find out how to do it.
I have tried creating a plugin using Dpa99c's answer here but I a. don't know where to put the java class before compiling and b. no matter where I try I just keep getting errors.
[phonegap] compiling Android...
[error] An error occurred while building the android project.Error executing "ant debug -f ".../phone/news/platforms/android/build.xml"":
BUILD FAILED
.../android-sdk-linux/tools/ant/build.xml:720: The following error occurred while executing this line:
.../android-sdk-linux/tools/ant/build.xml:734: Compile failed; see the compiler error output for details.
Total time: 6 seconds

Related

Gradle error trying to run nativescript app on android emulator on mac

I'm trying to run a nativescript app on android using tns run android
I'm always getting gradle error:
FAILURE: Build failed with an exception.
* Where:
Build file:
'/Volumes/My_SSD/myproject/platforms/tempPlugin/kinvey_nativescript_sdk/bui
ld.gradle' line: 28
* What went wrong:
A problem occurred evaluating root project '`kinvey_nativescript_sdk`'.
> Failed to apply plugin [class 'org.gradle.api.plugins.BasePlugin']
> Could not create service of type OutputFilesRepository using ExecutionServices.createOutputFilesRepository().`
I tried the following:
Run ./gradlew --stacktrace but I got this error:
Caused by: org.gradle.cache.LockTimeoutException: Timeout waiting to lock
execution history cache
(/Volumes/My_SSD/myproject/platforms/tempPlugin/kinvey_nativescript_sdk/.gr
adle/5.1.1/executionHistory). It is currently in use by another Gradle
instance.
Owner PID: unknown
Our PID: 50331
Owner Operation: unknown
Our operation:
Lock file:
/Volumes/My_SSD/myproject/platforms/tempPlugin/kinvey_nativescript_sdk/.gra
dle/5.1.1/executionHistory/executionHistory.lock
Deleted .lock files manually and re-ran tns run android but I got the same error again
Run
chmod R+x/Volumes/My_SSD/myproject/platforms/tempPlugin/kinvey_nativescript_sdk
Didn't fix the problem
The app runs fine on ios emulator and but not on android
I was having the same problem, looks to be related with this Gradle issue.
The workaround I found here is to move the project to the home folder (~).

Getting error like DexArchiveBuilderException at build time

I am getting following error at run time as well as build clean time
Error:com.android.builder.dexing.DexArchiveBuilderException:
Failed to process F:\bkp\projectname\app\build\intermediates\transforms\instantRunSlicer\debug\9

Where can I check Ionic's compiler error output?

I'm using Ionic and this is the message:
BUILD FAILED C:\adt\sdk\tools\ant\build.xml:720: The following error
occurred while executing this line:
C:\adt\sdk\tools\ant\build.xml:734: Compile failed; see the compiler
error output for details.
Total time: 5 seconds
C:\wamp\www\external\projectx\dirx\platforms\android\cordova\node_modules\q\q.js:126
Where can I see the log details? I've tried googling a bunch of things like "ionic log path" etc but nothing comes up. I saw something else that said run it with a -c argument but the output is the same.
Make sure you update your sdk, sometimes error occur when trying to build android incompatible API to your cordova version or ionic.

Maximo Anywhere WorkManager build failed

I am try to build android apps but while creating apps my build failed with following errors.
D:\ibm\AnywhereWorkManager\build.xml:87: The following error occurred
while executing this line:
D:\ibm\AnywhereWorkManager\anywhere-apps-builder.xml:720: The
following error occurred while executing this line:
D:\ibm\AnywhereWorkManager\anywhere-apps-builder.xml:716: Failed
building application:
com.worklight.builder.exception.WorklightBuildException:
java.io.IOException: Unable to delete directory
D:\ibm\AnywhereWorkManager\apps\WorkApproval\android\native\assets\www\default\dojo\cldr\nls\zh-hans-mo.
at
org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:551)
I know this answer might seem obvious, but if you have any of the files mentioned in the failure (D:\ibm\AnywhereWorkManager\apps\WorkApproval\android\native\assets\www\default\dojo\cldr\nls\zh-hans-mo)
open ( commandline, eclipse, other editor), this will cause the issue.

Jenkins unable to locate files on my computer

when ever I try to build my android project on jenkins it fails by saying :
Started by user anonymous
Building in workspace /home/tanzeelrana/git/eventmatrix-cordova-app/mysteryshopper_version2
[mysteryshopper_version2] $ ant -Dlabel=trial1-9 clean debug
Buildfile: /home/tanzeelrana/git/eventmatrix-cordova-app/mysteryshopper_version2/build.xml
BUILD FAILED
/home/tanzeelrana/git/eventmatrix-cordova-app/mysteryshopper_version2/build.xml:90: Cannot find /home/tanzeelrana/android-sdk-linux/tools/ant/build.xml imported from /home/tanzeelrana/git/eventmatrix-cordova-app/mysteryshopper_version2/build.xml
Total time: 0 seconds
Build step 'Invoke Ant' marked build as failure
Finished: FAILURE
on line 90 in my build.xml file I have a tag with the following in it :
import file="/home/tanzeelrana/android-sdk-linux/tools/ant/build.xml"
does anyone know why it is unable to locate this file ? the file exist at the exact path ....
Jenkins usually runs with its own user (jenkins),
so it is probably an issue of permissions.
Try printing the current user from within your Jenkins job.
EDIT:
See here about running Jenkins as a daemon -
it also shows how to set it to run as a different user than 'jenkins':
Installing Jenkins as a Unix daemon

Categories

Resources