react-native-network-info icon indicating copy to clipboard operation
react-native-network-info copied to clipboard

Problem when tryna to create the apk

Open AlessandroCavaglia opened this issue 5 years ago • 3 comments

hi, i'm new in the react programming so i might be missing something really stupid, i installed the library with npm made a simple alert script to see the ssid and then wanted to create the apk to check if everything works, i used the $ react-native bundle and then the $ ./gradlew assembleDebug but it crashes and gives me this error:

Task :react-native-network-info:verifyReleaseResources FAILED

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':react-native-network-info:verifyReleaseResources'.

java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed D:\Webstorm projects\untitled1\node_modules\react-native-network-info\android\build\intermediates\res\merged\release\values-v28\values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found. D:\Webstorm projects\untitled1\node_modules\react-native-network-info\android\build\intermediates\res\merged\release\values-v28\values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found. D:\Webstorm projects\untitled1\node_modules\react-native-network-info\android\build\intermediates\res\merged\release\values\values.xml:2714: error: resource android:attr/fontVariationSettings not found. D:\Webstorm projects\untitled1\node_modules\react-native-network-info\android\build\intermediates\res\merged\release\values\values.xml:2715: error: resource android:attr/ttcIndex not found. error: failed linking references.

What should i do?

AlessandroCavaglia avatar Apr 16 '19 19:04 AlessandroCavaglia

  • 1 on this

melhotiby avatar Apr 24 '19 23:04 melhotiby

This is a mismatch SDK version, you need to update your compileSdkVersion in /node_modules/react-native-network-info/android/build.gradle

android { compileSdkVersion 28

defaultConfig {
    minSdkVersion 16
    targetSdkVersion 28
    versionCode 1
    versionName "1.0"
}
lintOptions {
    abortOnError false
}

}

oliviermtl avatar May 13 '19 09:05 oliviermtl

@oliviermtl Thanks for the help!

Dror-Bar avatar May 28 '19 09:05 Dror-Bar