@@ -734,12 +734,13 @@ private void createInitLayout(SDKUrlHolder downloadUrls) {
734
734
if (Platform .getName ()!="linux" ) addPackage (gc ,5 ,packagesPanel ,"Android Build Tools: " ,downloadUrls .haxmVersion );
735
735
736
736
//SDK_Path selection Panel---------------------------------------
737
+ final String endPoint = File .separator +"android" +File .separator +"sdk" ;
737
738
JPanel downloadPathPanel = new JPanel ();
738
739
downloadPathPanel .setLayout (new BorderLayout ());
739
740
JLabel pathLabel = new JLabel ("Installation Path: " );
740
741
downloadPathPanel .add (pathLabel ,BorderLayout .NORTH );
741
742
742
- final JLabel locationLabel = new JLabel (processing .app .Base .getSketchbookFolder ().getAbsolutePath ());
743
+ final JLabel locationLabel = new JLabel (processing .app .Base .getSketchbookFolder ().getAbsolutePath ()+ endPoint );
743
744
locationLabel .setMaximumSize (Toolkit .zoom (200 ,locationLabel .getHeight ()));
744
745
locationLabel .setPreferredSize (Toolkit .zoom (200 ,locationLabel .getHeight ()));
745
746
locationLabel .setToolTipText (locationLabel .getText ());
@@ -759,7 +760,7 @@ public void actionPerformed(ActionEvent e) {
759
760
fd .setVisible (true );
760
761
System .setProperty ("apple.awt.fileDialogForDirectories" , "false" );
761
762
if (fd .getFile () != null ){
762
- locationLabel .setText (new File (fd .getDirectory (),fd .getFile ()).getAbsolutePath ());
763
+ locationLabel .setText (new File (fd .getDirectory (),fd .getFile ()).getAbsolutePath ()+ endPoint );
763
764
locationLabel .setToolTipText (locationLabel .getText ());
764
765
}
765
766
} else {
@@ -769,7 +770,7 @@ public void actionPerformed(ActionEvent e) {
769
770
fc .setFileSelectionMode (JFileChooser .DIRECTORIES_ONLY );
770
771
fc .showOpenDialog (SDKDownloader .super .rootPane ); //To put it on top of the modalDialog
771
772
if (fc .getSelectedFile () != null ) {
772
- locationLabel .setText (fc .getSelectedFile ().getAbsolutePath ());
773
+ locationLabel .setText (fc .getSelectedFile ().getAbsolutePath ()+ endPoint );
773
774
locationLabel .setToolTipText (locationLabel .getText ());
774
775
}
775
776
}
@@ -787,7 +788,8 @@ public void actionPerformed(ActionEvent e) {
787
788
continueButton .addActionListener (new ActionListener () {
788
789
@ Override
789
790
public void actionPerformed (ActionEvent e ) {
790
- File sdkFolder = new File (locationLabel .getText ());
791
+ String path = locationLabel .getText ();
792
+ File sdkFolder = new File (path .substring (0 ,path .indexOf (endPoint )));
791
793
run (urlHolder ,sdkFolder );
792
794
createLayout ();
793
795
}
0 commit comments