Note that there are some explanatory texts on larger screens.

plurals
  1. POCreate an Android Virtual Device From a Java application Programmatically
    primarykey
    data
    text
    <p>I want to create my Android virtual device from another java application. I don't want to use the default Android AvdManager because you can't set where you want to create your AVD and it has problem with exotic caraters.</p> <p>So I get the sdklib.jar of the AvdMagager and try to do this.</p> <p>But I can't create a AVD because I have the log : <br/> Error<br/> Unable to find a '%1$s' file for ABI %2$s to copy into the AVD folder.</p> <p>This is an exemple of what I do : </p> <pre><code>class Choice implements ISdkLog { public Choice() { com.android.sdklib.internal.avd.AvdManager avdmanager; try { com.android.sdklib.SdkManager manager = com.android.sdklib.SdkManager.createManager("Boulet", this); IAndroidTarget[] targets = manager.getTargets(); avdmanager= new com.android.sdklib.internal.avd.AvdManager(manager,this); avdmanager.createAvd(new java.io.File("filename"), "dunno", targets[0], "dunno", "dunno", "dunno", null, false, false, false, this); } catch (AndroidLocationException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } //Method of interface ISdkLog @Override public void error(Throwable arg0, String arg1, Object... arg2) { // TODO Auto-generated method stub System.out.println("Error"); System.out.println(arg1); System.out.println(arg0); } @Override public void printf(String arg0, Object... arg1) { // TODO Auto-generated method stub System.out.println("Log"); System.out.println(arg0); } @Override public void warning(String arg0, Object... arg1) { // TODO Auto-generated method stub System.out.println("Warning"); System.out.println(arg0); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload