1

As title, is there any difference on the JAR that is created from Eclipse Export function vs ANT build if i were to run it with uiautomator? Referring to Android UI Testing, I try to build JAR using ANT but i encounter some problem and couldnt fix it. So, i try to use Eclipse Export function to create the JAR and run it with Uiautomator. But then, i'm getting another problem. I've been googling around and cracking my head to get over this error so that i can test my stuff. Can anyone shed some light?

Community
  • 1
  • 1
ET.
  • 83
  • 1
  • 9
  • The jar exported by using android ANT build.xml creates a .dex file in the jar. When you export from eclipse it will create a normal Java jar and I guess android(dalvik vm) does not understand this. If you want to avoid the head ache of building jar and executing you can try [UIAutomator-bot](http://uiautomator-bot.blogspot.in/2014/08/create-and-execute-uiautomator-test.html) – Dnavir Feb 02 '15 at 10:18
  • I've tried your UiAutomator-bot, but when i try to run, it prompt me asking to perform ant build. But, when i try to do ant build, it failed saying build.xml does not exist. – ET. Feb 03 '15 at 07:24
  • As you were not able to build with ANT too, I suspect the problem is with your SDK. Please update your SDK and check. – Dnavir Feb 04 '15 at 04:44

1 Answers1

0

I manage to solve my problem by adding a AndroidManifest.xml to the project and i can then build JAR using ANT. The JAR runs perfectly with uiautomator

ET.
  • 83
  • 1
  • 9