jenkins android can't find sdkmanager.jar

2019-04-11 08:38发布

问题:

I'm running jenkins on mac OS. I have ant build file which tries to execute in one of targets. I have correct path as I've included android sdk tools and platform-tools folders to it but still I'm getting "android can't find sdkmanager,jar" error.

If I move described jar from lib folder to tools folder I'm getting some other similar error related to another jar, so it seems it just can't get this jar from lib folder...Please help.

回答1:

I solved my problem. I had correct path and sdk installation directory. Problem was that my Jenkins was running under another user and couldn't locate directory with android lib because they where denied for it. So problem was in sdk folder permissions. I've just ran chmod -R 0755 mySdkDirLocation from console under bash and became the happiest developer on earth for the moment:)



回答2:

After I ran chmod -R 0755 mySdkDirLocation. The error "android can't find sdkmanager.jar" went away. But when I ran android update sdk -u, I cannot install archives. So I ran chmod 777 mySdkDirLocation. Then the downloading worked.