I am doing a learning project. Faced with mysticism:
after writing the identifier for the View and starting the app in the emulator, R.java disappears in the project in an inexplicable way.
More details:
Set identifiers:
<RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/color_accent"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/user_profile.placeholder.image" android:textColor="@color/white" android:fontFamily="sans-serif-medium" android:layout_above="@id/photo_placeholder" android:layout_centerHorizontal="true" /> <ImageView android:id="@+id/photo_placeholder" android:layout_width="@dimen/placeholder_photo_size_90" android:layout_height="@dimen/placeholder_photo_size_90" android:scaleType="centerCrop" android:src="@drawable/add_a_photo_48px" android:layout_centerHorizontal="true" android:layout_alignParentBottom="true" android:layout_marginBottom="@dimen/spacing_large_56"/> </RelativeLayout> Run the application in the emulator to see what the views look like.
After starting the application, we get the error:
Error: (58, 51) found at (at 'layout_above' with value '@ id / photo_placeholder').
The error is due to the fact that all R.java from the project completely disappeared.
Running the app with earlier changes did not lead to anything like this.
I'm in ahu ... some confusion.
Without relying on Git, I made local project backups after each change in which the project remained operational. This allowed us to accurately determine the moment of disappearance of R.java.
R.java disappear at the moment of launching the app.
What could it be?
Work got up, I do not understand what is happening.
Here are R.java, found by searching in the project before mystical changes:
After all these files are missing, the assembly crashes.
Technical information:
Project: https://github.com/miller7777777/DevIntensive Hometask_3 branch see DevIntensive \ app \ src \ main \ res \ layout \ activity_main.xml file
Windows 10x64 Android Studio 2.1.2
Screw healthy, walked chkdsk, no problem. There are no viruses.
Clean project / Rebuild Project also does not help.
What could it be?
