Exception 16 is thrown during Preview Rendering of XML file and one string throws error “is translated here...












0















I have the following XML file:



        <?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.ad123.oshikwanyamadictionary.EditorActivity"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="7dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior">

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:text="term in question"
android:textSize="20sp"
android:paddingTop="3dp"
android:paddingStart="3dp"
android:paddingLeft="3dp"
android:paddingBottom="10dp"
android:gravity="center_horizontal"
android:id="@+id/term_in_question"/>
<AutoCompleteTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textCapSentences"
android:hint="@string/translation_suggestion"
android:id="@+id/suggestion_edit_text"
/>
<Spinner
android:paddingTop="10dp"
android:paddingLeft="3dp"
android:paddingStart="3dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"

android:id="@+id/language_report_spinner">
</Spinner>
<!--android:entries="@array/sourceLanguage"
android:entries="@array/wordType"-->
<Spinner
android:paddingTop="15dp"
android:paddingLeft="3dp"
android:paddingStart="3dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/word_type_spinner"
android:visibility="gone">
</Spinner>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:inputType="textCapSentences"
android:id="@+id/term_plural_edit_text"
android:hint="@string/plural_of_term_contribution"
android:visibility="gone"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:inputType="textCapSentences"
android:visibility="gone"
android:id="@+id/translation_plural_edit_text"
android:hint="@string/plural_of_translation_contribution"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:visibility="gone"
android:id="@+id/term_example_edit_text"
android:hint="@string/example_using_term_contribution"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:inputType="textCapSentences"
android:visibility="gone"
android:id="@+id/translation_example_edit_text"
android:hint="@string/example_using_translation_contrinution"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:inputType="textCapSentences"
android:visibility="gone"
android:id="@+id/alternative"
android:hint="@string/alternative_edit_text"/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:id="@+id/send_data"
android:text="@string/send_data"
android:backgroundTint="@color/Button"/>
<ProgressBar
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_gravity="center_horizontal"
android:layout_margin="5dp"
android:visibility="gone"
android:id="@+id/progress_bar_edit"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/or_edit_choose"/>
</LinearLayout>


Now if I try to preview it, it throws the following exception:



java.lang.ArrayIndexOutOfBoundsException: 16
at android.text.StaticLayout.generate(StaticLayout.java:854)
at android.text.StaticLayout.<init>(StaticLayout.java:603)
at android.text.StaticLayout.<init>(StaticLayout.java:50)
at android.text.StaticLayout$Builder.build(StaticLayout.java:425)
at android.widget.TextView.makeNewLayout(TextView.java:8272)
at android.widget.TextView.assumeLayout(TextView.java:8104)
at android.widget.TextView.onPreDraw(TextView.java:6742)
at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:977)
at android.view.AttachInfo_Accessor.dispatchOnPreDraw(AttachInfo_Accessor.java:46)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.renderAndBuildResult(RenderSessionImpl.java:404)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.renderAndBuildResult(RenderSessionImpl.java:543)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.render(RenderSessionImpl.java:426)
at com.android.layoutlib.bridge.BridgeRenderSession.render(BridgeRenderSession.java:108)
at com.android.ide.common.rendering.api.RenderSession.render(RenderSession.java:154)
at com.android.ide.common.rendering.api.RenderSession.render(RenderSession.java:136)
at com.android.tools.idea.rendering.RenderTask.lambda$renderInner$5(RenderTask.java:671)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)


I have already tried to clean the project and also change the target api of the preview, but nothing seems to help. At the same time I get an error for only one string. It is the string used in the last TextView: @String/or_edit_choose. Although it is translated to all languages, it still gives me the error message: "or_edit_choose is translated here but not in default locale". The thing is, that the error message is shown to me in the default strings.xml file, which should be the default locale. I do not know if the errors are connected, but they both showed up at the same time. There was also a brief moment, where the string could be accessed from another layout file, just not from the one given above. Now it cannot be accessed from any file.










share|improve this question























  • instead of tools:text="term in question" write android:text="term in question"

    – Kevin Kurien
    Nov 28 '18 at 8:56











  • That didn't have any effect on the error

    – Adrian Breiding
    Nov 28 '18 at 10:15
















0















I have the following XML file:



        <?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.ad123.oshikwanyamadictionary.EditorActivity"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="7dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior">

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:text="term in question"
android:textSize="20sp"
android:paddingTop="3dp"
android:paddingStart="3dp"
android:paddingLeft="3dp"
android:paddingBottom="10dp"
android:gravity="center_horizontal"
android:id="@+id/term_in_question"/>
<AutoCompleteTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textCapSentences"
android:hint="@string/translation_suggestion"
android:id="@+id/suggestion_edit_text"
/>
<Spinner
android:paddingTop="10dp"
android:paddingLeft="3dp"
android:paddingStart="3dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"

android:id="@+id/language_report_spinner">
</Spinner>
<!--android:entries="@array/sourceLanguage"
android:entries="@array/wordType"-->
<Spinner
android:paddingTop="15dp"
android:paddingLeft="3dp"
android:paddingStart="3dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/word_type_spinner"
android:visibility="gone">
</Spinner>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:inputType="textCapSentences"
android:id="@+id/term_plural_edit_text"
android:hint="@string/plural_of_term_contribution"
android:visibility="gone"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:inputType="textCapSentences"
android:visibility="gone"
android:id="@+id/translation_plural_edit_text"
android:hint="@string/plural_of_translation_contribution"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:visibility="gone"
android:id="@+id/term_example_edit_text"
android:hint="@string/example_using_term_contribution"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:inputType="textCapSentences"
android:visibility="gone"
android:id="@+id/translation_example_edit_text"
android:hint="@string/example_using_translation_contrinution"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:inputType="textCapSentences"
android:visibility="gone"
android:id="@+id/alternative"
android:hint="@string/alternative_edit_text"/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:id="@+id/send_data"
android:text="@string/send_data"
android:backgroundTint="@color/Button"/>
<ProgressBar
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_gravity="center_horizontal"
android:layout_margin="5dp"
android:visibility="gone"
android:id="@+id/progress_bar_edit"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/or_edit_choose"/>
</LinearLayout>


Now if I try to preview it, it throws the following exception:



java.lang.ArrayIndexOutOfBoundsException: 16
at android.text.StaticLayout.generate(StaticLayout.java:854)
at android.text.StaticLayout.<init>(StaticLayout.java:603)
at android.text.StaticLayout.<init>(StaticLayout.java:50)
at android.text.StaticLayout$Builder.build(StaticLayout.java:425)
at android.widget.TextView.makeNewLayout(TextView.java:8272)
at android.widget.TextView.assumeLayout(TextView.java:8104)
at android.widget.TextView.onPreDraw(TextView.java:6742)
at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:977)
at android.view.AttachInfo_Accessor.dispatchOnPreDraw(AttachInfo_Accessor.java:46)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.renderAndBuildResult(RenderSessionImpl.java:404)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.renderAndBuildResult(RenderSessionImpl.java:543)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.render(RenderSessionImpl.java:426)
at com.android.layoutlib.bridge.BridgeRenderSession.render(BridgeRenderSession.java:108)
at com.android.ide.common.rendering.api.RenderSession.render(RenderSession.java:154)
at com.android.ide.common.rendering.api.RenderSession.render(RenderSession.java:136)
at com.android.tools.idea.rendering.RenderTask.lambda$renderInner$5(RenderTask.java:671)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)


I have already tried to clean the project and also change the target api of the preview, but nothing seems to help. At the same time I get an error for only one string. It is the string used in the last TextView: @String/or_edit_choose. Although it is translated to all languages, it still gives me the error message: "or_edit_choose is translated here but not in default locale". The thing is, that the error message is shown to me in the default strings.xml file, which should be the default locale. I do not know if the errors are connected, but they both showed up at the same time. There was also a brief moment, where the string could be accessed from another layout file, just not from the one given above. Now it cannot be accessed from any file.










share|improve this question























  • instead of tools:text="term in question" write android:text="term in question"

    – Kevin Kurien
    Nov 28 '18 at 8:56











  • That didn't have any effect on the error

    – Adrian Breiding
    Nov 28 '18 at 10:15














0












0








0








I have the following XML file:



        <?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.ad123.oshikwanyamadictionary.EditorActivity"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="7dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior">

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:text="term in question"
android:textSize="20sp"
android:paddingTop="3dp"
android:paddingStart="3dp"
android:paddingLeft="3dp"
android:paddingBottom="10dp"
android:gravity="center_horizontal"
android:id="@+id/term_in_question"/>
<AutoCompleteTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textCapSentences"
android:hint="@string/translation_suggestion"
android:id="@+id/suggestion_edit_text"
/>
<Spinner
android:paddingTop="10dp"
android:paddingLeft="3dp"
android:paddingStart="3dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"

android:id="@+id/language_report_spinner">
</Spinner>
<!--android:entries="@array/sourceLanguage"
android:entries="@array/wordType"-->
<Spinner
android:paddingTop="15dp"
android:paddingLeft="3dp"
android:paddingStart="3dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/word_type_spinner"
android:visibility="gone">
</Spinner>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:inputType="textCapSentences"
android:id="@+id/term_plural_edit_text"
android:hint="@string/plural_of_term_contribution"
android:visibility="gone"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:inputType="textCapSentences"
android:visibility="gone"
android:id="@+id/translation_plural_edit_text"
android:hint="@string/plural_of_translation_contribution"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:visibility="gone"
android:id="@+id/term_example_edit_text"
android:hint="@string/example_using_term_contribution"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:inputType="textCapSentences"
android:visibility="gone"
android:id="@+id/translation_example_edit_text"
android:hint="@string/example_using_translation_contrinution"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:inputType="textCapSentences"
android:visibility="gone"
android:id="@+id/alternative"
android:hint="@string/alternative_edit_text"/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:id="@+id/send_data"
android:text="@string/send_data"
android:backgroundTint="@color/Button"/>
<ProgressBar
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_gravity="center_horizontal"
android:layout_margin="5dp"
android:visibility="gone"
android:id="@+id/progress_bar_edit"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/or_edit_choose"/>
</LinearLayout>


Now if I try to preview it, it throws the following exception:



java.lang.ArrayIndexOutOfBoundsException: 16
at android.text.StaticLayout.generate(StaticLayout.java:854)
at android.text.StaticLayout.<init>(StaticLayout.java:603)
at android.text.StaticLayout.<init>(StaticLayout.java:50)
at android.text.StaticLayout$Builder.build(StaticLayout.java:425)
at android.widget.TextView.makeNewLayout(TextView.java:8272)
at android.widget.TextView.assumeLayout(TextView.java:8104)
at android.widget.TextView.onPreDraw(TextView.java:6742)
at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:977)
at android.view.AttachInfo_Accessor.dispatchOnPreDraw(AttachInfo_Accessor.java:46)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.renderAndBuildResult(RenderSessionImpl.java:404)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.renderAndBuildResult(RenderSessionImpl.java:543)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.render(RenderSessionImpl.java:426)
at com.android.layoutlib.bridge.BridgeRenderSession.render(BridgeRenderSession.java:108)
at com.android.ide.common.rendering.api.RenderSession.render(RenderSession.java:154)
at com.android.ide.common.rendering.api.RenderSession.render(RenderSession.java:136)
at com.android.tools.idea.rendering.RenderTask.lambda$renderInner$5(RenderTask.java:671)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)


I have already tried to clean the project and also change the target api of the preview, but nothing seems to help. At the same time I get an error for only one string. It is the string used in the last TextView: @String/or_edit_choose. Although it is translated to all languages, it still gives me the error message: "or_edit_choose is translated here but not in default locale". The thing is, that the error message is shown to me in the default strings.xml file, which should be the default locale. I do not know if the errors are connected, but they both showed up at the same time. There was also a brief moment, where the string could be accessed from another layout file, just not from the one given above. Now it cannot be accessed from any file.










share|improve this question














I have the following XML file:



        <?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.ad123.oshikwanyamadictionary.EditorActivity"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="7dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior">

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:text="term in question"
android:textSize="20sp"
android:paddingTop="3dp"
android:paddingStart="3dp"
android:paddingLeft="3dp"
android:paddingBottom="10dp"
android:gravity="center_horizontal"
android:id="@+id/term_in_question"/>
<AutoCompleteTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textCapSentences"
android:hint="@string/translation_suggestion"
android:id="@+id/suggestion_edit_text"
/>
<Spinner
android:paddingTop="10dp"
android:paddingLeft="3dp"
android:paddingStart="3dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"

android:id="@+id/language_report_spinner">
</Spinner>
<!--android:entries="@array/sourceLanguage"
android:entries="@array/wordType"-->
<Spinner
android:paddingTop="15dp"
android:paddingLeft="3dp"
android:paddingStart="3dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/word_type_spinner"
android:visibility="gone">
</Spinner>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:inputType="textCapSentences"
android:id="@+id/term_plural_edit_text"
android:hint="@string/plural_of_term_contribution"
android:visibility="gone"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:inputType="textCapSentences"
android:visibility="gone"
android:id="@+id/translation_plural_edit_text"
android:hint="@string/plural_of_translation_contribution"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:visibility="gone"
android:id="@+id/term_example_edit_text"
android:hint="@string/example_using_term_contribution"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:inputType="textCapSentences"
android:visibility="gone"
android:id="@+id/translation_example_edit_text"
android:hint="@string/example_using_translation_contrinution"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:inputType="textCapSentences"
android:visibility="gone"
android:id="@+id/alternative"
android:hint="@string/alternative_edit_text"/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:id="@+id/send_data"
android:text="@string/send_data"
android:backgroundTint="@color/Button"/>
<ProgressBar
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_gravity="center_horizontal"
android:layout_margin="5dp"
android:visibility="gone"
android:id="@+id/progress_bar_edit"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/or_edit_choose"/>
</LinearLayout>


Now if I try to preview it, it throws the following exception:



java.lang.ArrayIndexOutOfBoundsException: 16
at android.text.StaticLayout.generate(StaticLayout.java:854)
at android.text.StaticLayout.<init>(StaticLayout.java:603)
at android.text.StaticLayout.<init>(StaticLayout.java:50)
at android.text.StaticLayout$Builder.build(StaticLayout.java:425)
at android.widget.TextView.makeNewLayout(TextView.java:8272)
at android.widget.TextView.assumeLayout(TextView.java:8104)
at android.widget.TextView.onPreDraw(TextView.java:6742)
at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:977)
at android.view.AttachInfo_Accessor.dispatchOnPreDraw(AttachInfo_Accessor.java:46)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.renderAndBuildResult(RenderSessionImpl.java:404)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.renderAndBuildResult(RenderSessionImpl.java:543)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.render(RenderSessionImpl.java:426)
at com.android.layoutlib.bridge.BridgeRenderSession.render(BridgeRenderSession.java:108)
at com.android.ide.common.rendering.api.RenderSession.render(RenderSession.java:154)
at com.android.ide.common.rendering.api.RenderSession.render(RenderSession.java:136)
at com.android.tools.idea.rendering.RenderTask.lambda$renderInner$5(RenderTask.java:671)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)


I have already tried to clean the project and also change the target api of the preview, but nothing seems to help. At the same time I get an error for only one string. It is the string used in the last TextView: @String/or_edit_choose. Although it is translated to all languages, it still gives me the error message: "or_edit_choose is translated here but not in default locale". The thing is, that the error message is shown to me in the default strings.xml file, which should be the default locale. I do not know if the errors are connected, but they both showed up at the same time. There was also a brief moment, where the string could be accessed from another layout file, just not from the one given above. Now it cannot be accessed from any file.







android xml android-studio render






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 28 '18 at 8:29









Adrian BreidingAdrian Breiding

357




357













  • instead of tools:text="term in question" write android:text="term in question"

    – Kevin Kurien
    Nov 28 '18 at 8:56











  • That didn't have any effect on the error

    – Adrian Breiding
    Nov 28 '18 at 10:15



















  • instead of tools:text="term in question" write android:text="term in question"

    – Kevin Kurien
    Nov 28 '18 at 8:56











  • That didn't have any effect on the error

    – Adrian Breiding
    Nov 28 '18 at 10:15

















instead of tools:text="term in question" write android:text="term in question"

– Kevin Kurien
Nov 28 '18 at 8:56





instead of tools:text="term in question" write android:text="term in question"

– Kevin Kurien
Nov 28 '18 at 8:56













That didn't have any effect on the error

– Adrian Breiding
Nov 28 '18 at 10:15





That didn't have any effect on the error

– Adrian Breiding
Nov 28 '18 at 10:15












2 Answers
2






active

oldest

votes


















0














In strings.xml add this line



tools:ignore="ExtraTranslation" xmlns:tools="http://schemas.android.com/tools"



to <resources> tag



like this



<resources tools:ignore="ExtraTranslation" xmlns:tools="http://schemas.android.com/tools">





share|improve this answer
























  • Worked like a charm, although that only solved the second problem. But thank you for that.

    – Adrian Breiding
    Nov 28 '18 at 10:14



















0














Apparently the tag android:visibility="gone" caused the rendering to be impossible. After I changed it to visible in the xml, to change it in the java file to the values needed, the rendering worked without a problem. I have no idea though, why this might be affecting the rendering.






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53515121%2fexception-16-is-thrown-during-preview-rendering-of-xml-file-and-one-string-throw%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    In strings.xml add this line



    tools:ignore="ExtraTranslation" xmlns:tools="http://schemas.android.com/tools"



    to <resources> tag



    like this



    <resources tools:ignore="ExtraTranslation" xmlns:tools="http://schemas.android.com/tools">





    share|improve this answer
























    • Worked like a charm, although that only solved the second problem. But thank you for that.

      – Adrian Breiding
      Nov 28 '18 at 10:14
















    0














    In strings.xml add this line



    tools:ignore="ExtraTranslation" xmlns:tools="http://schemas.android.com/tools"



    to <resources> tag



    like this



    <resources tools:ignore="ExtraTranslation" xmlns:tools="http://schemas.android.com/tools">





    share|improve this answer
























    • Worked like a charm, although that only solved the second problem. But thank you for that.

      – Adrian Breiding
      Nov 28 '18 at 10:14














    0












    0








    0







    In strings.xml add this line



    tools:ignore="ExtraTranslation" xmlns:tools="http://schemas.android.com/tools"



    to <resources> tag



    like this



    <resources tools:ignore="ExtraTranslation" xmlns:tools="http://schemas.android.com/tools">





    share|improve this answer













    In strings.xml add this line



    tools:ignore="ExtraTranslation" xmlns:tools="http://schemas.android.com/tools"



    to <resources> tag



    like this



    <resources tools:ignore="ExtraTranslation" xmlns:tools="http://schemas.android.com/tools">






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Nov 28 '18 at 8:53









    code4roxcode4rox

    198112




    198112













    • Worked like a charm, although that only solved the second problem. But thank you for that.

      – Adrian Breiding
      Nov 28 '18 at 10:14



















    • Worked like a charm, although that only solved the second problem. But thank you for that.

      – Adrian Breiding
      Nov 28 '18 at 10:14

















    Worked like a charm, although that only solved the second problem. But thank you for that.

    – Adrian Breiding
    Nov 28 '18 at 10:14





    Worked like a charm, although that only solved the second problem. But thank you for that.

    – Adrian Breiding
    Nov 28 '18 at 10:14













    0














    Apparently the tag android:visibility="gone" caused the rendering to be impossible. After I changed it to visible in the xml, to change it in the java file to the values needed, the rendering worked without a problem. I have no idea though, why this might be affecting the rendering.






    share|improve this answer




























      0














      Apparently the tag android:visibility="gone" caused the rendering to be impossible. After I changed it to visible in the xml, to change it in the java file to the values needed, the rendering worked without a problem. I have no idea though, why this might be affecting the rendering.






      share|improve this answer


























        0












        0








        0







        Apparently the tag android:visibility="gone" caused the rendering to be impossible. After I changed it to visible in the xml, to change it in the java file to the values needed, the rendering worked without a problem. I have no idea though, why this might be affecting the rendering.






        share|improve this answer













        Apparently the tag android:visibility="gone" caused the rendering to be impossible. After I changed it to visible in the xml, to change it in the java file to the values needed, the rendering worked without a problem. I have no idea though, why this might be affecting the rendering.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 28 '18 at 10:51









        Adrian BreidingAdrian Breiding

        357




        357






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53515121%2fexception-16-is-thrown-during-preview-rendering-of-xml-file-and-one-string-throw%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Contact image not getting when fetch all contact list from iPhone by CNContact

            count number of partitions of a set with n elements into k subsets

            A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks