Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Solution for the error "error could not access the package manager. is the system running"

 
rajesh rasu
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When i install the android application in the emulator through ant script,the emulator is launched successfully.But i got error like "error could not access the package manager. is the system running" before installation of the application.Please tell solution for this.

My Ant code is below.

<?xml version="1.0" encoding="UTF-8"?>

<project name="myproject">

<target name="create_avd_device">
<exec executable="D:/android-sdk/tools/android.bat">
<arg value="create"/>
<arg value="avd"/>
<arg value="--target"/>
<arg value="2"/>
<arg value="--name"/>
<arg value="rt5"/>
</exec>
</target>


<target name="start.emulator" depends="create_avd_device" >
<exec executable="D:/android-sdk/tools/emulator.exe" timeout="30000">
<arg value="-avd"/>
<arg value="rt5"/>
</exec>
</target>


<target name="list_device">
<echo message="list of device"/>
<exec executable="D:/android-sdk/platform-tools/adb.exe">
<arg value="devices"/>

</exec>
</target>

<echo message="Build it and set it up for android" />
<echo message="launch of app"/>
<target name="push_tests_to_device" depends="list_device">

<exec executable="D:/android-sdk/platform-tools/adb.exe">
<arg value="install"/>
<arg value="-r"/>
<arg value="D:\AnBEmail.apk"/>
</exec>
</target>


</project>
 
mr Morena
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
rajesh rasu wrote:When i install the android application in the emulator through ant script,the emulator is launched successfully.But i got error like "error could not access the package manager. is the system running" before installation of the application.Please tell solution for this.

My Ant code is below.

<?xml version="1.0" encoding="UTF-8"?>

<project name="myproject">

<target name="create_avd_device">
<exec executable="D:/android-sdk/tools/android.bat">
<arg value="create"/>
<arg value="avd"/>
<arg value="--target"/>
<arg value="2"/>
<arg value="--name"/>
<arg value="rt5"/>
</exec>
</target>


<target name="start.emulator" depends="create_avd_device" >
<exec executable="D:/android-sdk/tools/emulator.exe" timeout="30000">
<arg value="-avd"/>
<arg value="rt5"/>
</exec>
</target>


<target name="list_device">
<echo message="list of device"/>
<exec executable="D:/android-sdk/platform-tools/adb.exe">
<arg value="devices"/>

</exec>
</target>

<echo message="Build it and set it up for android" />
<echo message="launch of app"/>
<target name="push_tests_to_device" depends="list_device">

<exec executable="D:/android-sdk/platform-tools/adb.exe">
<arg value="install"/>
<arg value="-r"/>
<arg value="D:\AnBEmail.apk"/>
</exec>
</target>


</project>


Dear,

Just wait until emulator be loaded completely, once it finished then you could simply run your application
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic