React-native-navigation: [v3] error: resource style/Widget.AppCompat.TextView (aka com.myapp:style/Widget.AppCompat.TextView) not found

Created on 16 Aug 2019  Â·  11Comments  Â·  Source: wix/react-native-navigation

Issue Description

After updating to rnn 3.0.0

What went wrong:
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
  error: resource style/Widget.AppCompat.TextView (aka com.myapp:style/Widget.AppCompat.TextView) not found.
  error: resource style/Widget.AppCompat.TextView (aka com.myapp:style/Widget.AppCompat.TextView) not found.
  error: resource style/Widget.AppCompat.TextView (aka com.myapp:style/Widget.AppCompat.TextView) not found.
  error: resource style/Widget.AppCompat.TextView (aka com.myapp:style/Widget.AppCompat.TextView) not found.
  error: failed linking references.

Environment

  • React Native Navigation version: 3.0.0
  • React Native version: 0.59.10 and 0.60.5
  • Platform(s) (iOS, Android, or both?): android
  • Device info (Simulator/Device? OS version? Debug/Release?): issue while building application
questiostack overflow

Most helpful comment

TEMPORARY FIX:

Add

<style name="Widget.AppCompat.TextView" parent="android:Widget">
        @null
</style>

to node_modules/react-native-navigation/lib/android/app/src/main/res/values/styles.xml

I know it's just a null value, but i saw this on production

    <style name="Widget.Support.CoordinatorLayout" parent="android:Widget">
        @null
    </style>

so maybe my fix is good? 🤔

All 11 comments

We use the issue tracker exclusively for bug reports and feature requests. This issue appears to be a general usage or support question. Instead, please ask a question on Stack Overflow with the react-native-navigation tag.

I have same problem while trying to upgrade v3. Did you find the solution? @solonifer

Also experiencing the same issue during assembleRelease

@solonifer Any way you could make a demo project, so that we can try to re-open the issue and get them to work on it? This is basically stopping adoption for RNN 3.x 😿

v3.2.1 released yesterday and still got the same error on RN0.60.5.
Please re-open and look into this.

If it helps, it has to do with implementation 'androidx.appcompat:appcompat:1.0.2 in app/build.gradle of the react native project. It seemed to transition from implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"

I'm sure it has to do with this. https://stackoverflow.com/questions/57478346/is-appcompat-possible-to-ignore-on-api-23/57480872#57480872.

The new android X version should contain androidx.appcompat.widget.AppCompatTextView and not android.widget.TextView.

TEMPORARY FIX:

Add

<style name="Widget.AppCompat.TextView" parent="android:Widget">
        @null
</style>

to node_modules/react-native-navigation/lib/android/app/src/main/res/values/styles.xml

I know it's just a null value, but i saw this on production

    <style name="Widget.Support.CoordinatorLayout" parent="android:Widget">
        @null
    </style>

so maybe my fix is good? 🤔

Wow @nikolas7892 that fixes everything. Thank you.

@guyca can we make a PR for this?

Yes I can make a pr
On Oct 10, 2019, 12:06 PM -0700, Adar notifications@github.com, wrote:

Wow @nikolas7892 that fixes everything. Thank you.
@guyca can we make a PR for this?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

v3.4.0 has this error still.

Was this page helpful?
0 / 5 - 0 ratings