I had to change my package name from com.example.chris.myapplication to com.tamaritz.chris.myapplication so that my app could be properly loaded and distributed via Google Play Store. To do this, I used the approach Android Studio Rename Package which was to basically create a new directory, copy contents, update Manifest. I got those steps down but I am having trouble with "change/rename the R file imports in whole project". When I made my package name change, my line of code(below) said "R cannot be resolved".
submit = (Button) v.findViewById(com.example.chris.myapplication.R.id.submitButton);
When I went to the imports part of the java source code(below)
package com.tamaritz.chris.myapplication;
import android.app.Activity;
import android.app.DialogFragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
Everything seemed to be line place, the right package name.
Do I have to put a manual R import? The person said to change/rename the import but I don't even see the original R import.
And this something else I did which I am not sure. A possible solution I found was just to do alt enter, and import the class. That line of code suddenly turned into
submit = (Button) v.findViewById(R.id.submitButton);
Is this a valid approach. Does the package name explictly need to be there? After I did this, i did not see any changes in the import section either.