react-native-network-info
react-native-network-info copied to clipboard
Problem when tryna to create the apk
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?
- 1 on this
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 Thanks for the help!