1

I have been stuck with this problem in react native version 0.64 latest. pdf view is throwing an error while configuring. I don't understand and not found the right answer.

enter image description here

James Z
  • 12,209
  • 10
  • 24
  • 44

1 Answers1

0

You can get more information about this error on this question: "JCenter is at end of life" android lint warning, what is the replacement?

You need to add mavenCentral() to android/build.gradle

repositories {
        google()
        jcenter()
        mavenCentral() //add this
    }

and

allprojects {
    repositories {
        ...
        google()
        jcenter()
        mavenCentral() //add this
        maven { url 'https://www.jitpack.io' }
    }
}
  • this is working now fine @james-z – Muhammad Sharjeel May 17 '22 at 06:32
  • return BuildConfig.DEBUG; ^ symbol: variable BuildConfig C:\KYLS_App\android\app\src\main\java\com\kyls\MainApplication.java:76: error: cannot find symbol if (BuildConfig.DEBUG) { ^ symbol: variable BuildConfig location: class MainApplication C:\KYLS_App\android\app\src\main\java\com\kyls\MainApplication.java:76: error: illegal parenthesized expression if (BuildConfig.DEBUG) { ^ Note: C:\KYLS_App\android\app\src\debug\java\com\kyls\ReactNativeFlipper.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. 3 errors – Muhammad Sharjeel May 17 '22 at 09:36
  • FAILURE: Build failed with an exception. What went wrong: Execution failed for task ':app:compileDebugJavaWithJavac'. Compilation failed; see the compiler error output for details. Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. Get more help at https://help.gradle.org BUILD FAILED in 1m 19s – Muhammad Sharjeel May 17 '22 at 09:36