Jenkins fails to parse POM on Mac - android

I am setting up CI with Jenkins on my Mac mini, but after all the configuration I get this error :
ERROR: Failed to parse POMs
java.io.
IOException: Cannot run program "/Users/Shared/Jenkins/Home/tools/hudson.model.JDK/JDK/bin/java" (in directory "/Users/Shared/Jenkins/Home/jobs/mavenTest/workspace"): error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
at hudson.Proc$LocalProc.<init>(Proc.java:244)
at hudson.Proc$LocalProc.<init>(Proc.java:216)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:773)
at hudson.Launcher$ProcStarter.start(Launcher.java:353)
at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:234)
at hudson.maven.ProcessCache.get(ProcessCache.java:235)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:729)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:586)
at hudson.model.Run.execute(Run.java:1603)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:506)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:247)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:135)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
... 12 more
This is Android project and should work, because I downloaded working sample from Maven related website. Any ideas?
edit :
in previous lines i get :
JDK installation skipped: Unknown CPU name: mac os x
JDK installation skipped: Unknown CPU name: mac os x
and I guess that's the problem. I see that I cannot use "install automaticaly JDK" on Mac, so I have to do it by hand, the problem is that path which is suppose to be good, returns error /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands doesn’t look like a JDK directory.
Path is : /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/

Related

Android Studio can't install android 12 when run with Installation Options - APK from app bundle

I use installation Options - Deploy - APK from app bundle becasuse of PAD(Play Asset Delivery).
Android 10, 11 build & run works well, but in android 12, install failed.
(But Build SUCCESSFUL)
and install failed message
Installation failed due to: 'Failed to commit install session 223924615 with command cmd package install-commit 223924615.
Error: INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION:
Failed parse during installPackageLI: /data/app/vmdl223924615.tmp/split_config.xxhdpi.apk (at Binary XML file line #0):
/data/app/vmdl223924615.tmp/split_config.arm64_v8a.apk (at Binary XML file line #0): Failed to read manifest from /data/app/vmdl223924615.tmp/split_assetPack.apk'
(My assets pack name is assetPack)
version info
android studio :
target SDK : 30
min SDK : 26
gradle version : 4.0.2
build tools version : 30.0.2
kotlin version : 1.4.10
implementation 'androidx.work:work-runtime-ktx:2.7.0-alpha05'
Put this line in build.gradle and sync...
work for me....

Error during Android 64-bit Delphi app deployment

I'm trying to build a 64-bit android app in Delphi 10.3.3, I get this error during deployment : [PAClient Error] Error: E6409 Cannot open file "D:\...\Android64\Release\TestApp\linked_res.ap_". The system cannot find the file specified
I don't have any file with name linked_res in deployment, I've built the project twice. Why I'm get this error?
go to Deployment ( Project->Deployment ) and add "provider_paths.xml" file and set "remote path" to "res\xml"

java.lang.IllegalArgumentException: Error: Failed to parse APK file:

I have search stockoverflow and google with no luck. I recently migrated my app to androidx, after a lot of effort I was able to fix all the build fails. but now I am getting the following error when the app is installing on the emulator or the device. any help will be highly appreciated.
I have tried the following:
invalidate caches/restart
clean build and rebuild project
uninstalled app from the device
restarted my pc
Exception occurred while executing:
java.lang.IllegalArgumentException: Error: Failed to parse APK file: /data/local/tmp/...
at com.android.server.pm.PackageManagerShellCommand.setParamsSize(PackageManagerShellCommand.java:338)
at com.android.server.pm.PackageManagerShellCommand.runInstall(PackageManagerShellCommand.java:906)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:158)
at android.os.ShellCommand.exec(ShellCommand.java:103)
at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:21328)
at android.os.Binder.shellCommand(Binder.java:634)
at android.os.Binder.onTransact(Binder.java:532)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:2821)
at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:3856)
at android.os.Binder.execTransact(Binder.java:731)
Caused by: android.content.pm.PackageParser$PackageParserException: Failed to parse /data/local/tmp/...
at android.content.pm.PackageParser.parseApkLiteInner(PackageParser.java:1590)
at android.content.pm.PackageParser.parseApkLite(PackageParser.java:1575)
at com.android.server.pm.PackageManagerShellCommand.setParamsSize(PackageManagerShellCommand.java:331)
... 9 more
$ adb shell pm uninstall ...
Unknown failure (at android.os.Binder.execTransact(Binder.java:731))
Error while Installing APK
Delete the previous app-release.apk file from the android folder:
\app\build\outputs\apk\release
Then clear all data from the emulator. Finally, rebuild the application.
Clean -> Rebuild -> and try to check both v1 and v2 while generating apk file
You should drop the cache on your mobile.
for example:
1- open your windows terminal on your computer
2 - enter the command >adb shell
you should be insite on your mobile
3 - enter to the tmp/appium_cache/ folder with >cd data/local/tmp/appium_cache
4 - write the command >ls to see all the elements that there is insite of that folder
5 - drop all that elements with the command >rm filename
hope to help you
just delete build folder and run again
android/app/build

"error=2, No such file or directory" when Hosting an executable within Android application

Problem Description
I'm am working with an android application that is hosting an arm executable located in the internal storage (/data/data/APPNAME/files/EXECUTABLE).
When I check the file like this :
filePath = context.getFilesDir().getPath()+"/SMILExtract-static"
Process process = Runtime.getRuntime().exec("file " + filePath);
the shell output is:
/data/user/0/app.me.phonestudy/files/SMILExtract-static: ELF shared object, 32-bit LSB arm, dynamic (/usr/lib/libc.so.1), for Android 21, built by NDK r15c (4203891), stripped
so the file must obviously exist.
Yet when I make the file executable and execute it:
Runtime.getRuntime().exec("/system/bin/chmod 777 " + filePath);
Runtime.getRuntime().exec(filePath);
I get this error:
04-04 22:26:41.774 24708-24896/app.me.phonestudy E/AndroidRuntime: FATAL EXCEPTION: data Processing Thread
Process: app.me.phonestudy, PID: 24708
java.lang.RuntimeException: java.io.IOException: Cannot run program "/data/user/0/app.me.phonestudy/files/SMILExtract-static": error=2, No such file or directory
Caused by: java.io.IOException: Cannot run program "/data/user/0/app.me.phonestudy/files/SMILExtract-static": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at java.lang.Runtime.exec(Runtime.java:692)
at java.lang.Runtime.exec(Runtime.java:525)
at java.lang.Runtime.exec(Runtime.java:422)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:133)
at java.lang.ProcessImpl.start(ProcessImpl.java:128)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
at java.lang.Runtime.exec(Runtime.java:692) 
at java.lang.Runtime.exec(Runtime.java:525) 
at java.lang.Runtime.exec(Runtime.java:422) 
at
Question
Why cant the file be found when it obviously exists at the given path?
My only lead is this post: https://askubuntu.com/questions/133389/no-such-file-or-directory-but-the-file-exists which mentions compatibility issues when trying to run a 32-bit binary on a 64-bit system that doesn't have 32-bit support installed. Since this post is not specifically for android systems it didnt really help me in solving my problem.
I appreciate your advice.
I believe either it can't find the material, or you didn't install it correctly.

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