Last Updated
Viewed 1,490 Times

I hate asking this, but I've never been able to find my Java folder on my current PC. I'd like to find it so I could use a keystore command to find my SHA and just to know where it is. I found a SHA number through gradlewindow/signing report, but now the api page isn't accepting it so I wanted to check through a 'keystore' command, which you apparently have to call with the command line folder path set somewhere in the Java folder. Here are both my program files. I've been successfully developing and publishing my android game for a year on this PC, so I figured I must have a Java folder somewhere. The toolbar search box hasn't helped (it never does), it just gives me website suggestions through Bing.

enter image description here

enter image description here

I'am trying to find a folder on my TABLET.

I am able to find the folder on my PHONE using this code:

 File settingsFolder = new File(Environment.getExternalStorageDirectory(), settingsFileDirectory);

I can find the folder on my phone but not on my tablet, what's going on there?

Created a folder with the same name in the same directory (sameas the downloads folder).

Greets

Thanks in advance for any help,

I'm trying to get a listview on the main activity to display the names of files in a folder, despite doing research here and on tutorials, I just can't get if to work and I don't know why.

Here is the row.xml for the listview row textview:

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

<TextView xmlns:android="http://schemas.android.com/apk/res/android"
          android:id="@android:id/text1"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:textAppearance="?android:attr/textAppearanceLarge"
          android:gravity="center_vertical"
          android:textColor="@color/black"
          android:paddingLeft="6dip"
          android:minHeight="?android:attr/listPreferredItemHeight"
        />

here is the main_activity.java:

String extStorageDirectory = Environment.getExternalStorageDirectory().toString();

@Override
public void onCreate(Bundle savedInstanceState){
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    ListView listView1 = (ListView) findViewById(R.id.actions);

    File directory = new File(extStorageDirectory
            + "/Android/data/com.tobin.backup");

    String[] filenames = directory.list();

    if (filenames == null){

    }

    else{

        ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
                android.R.layout.simple_list_item_1, filenames);

        listView1.setAdapter(adapter);

    }

I have no idea what is wrong, thanks for the help!

Edit: Here is the main activity layout: http://pastebin.com/cTkwRCNQ

I have started developing an Android application in Android Studio. After starting Android Studio it gives me an error: "compileSdkVersion android-21 requires compiling with JDK 7". So I ran java -version at the Commmand Prompt and it shows I have 1.7. But in Program Files there is a folder for JDK 1.6 but not for 1.7. JRE of 1.7 is there, but not JDK 1.7.

Any suggestions will be appreciated. Thanks in advance.

Similar Question 4 (2 solutions) : Android Studio can't find Java SDK in Windows 8

Similar Question 8 (1 solutions) : I can't see Extras Folder in Android Studio Folder

cc