Closed mounirlahsini closed 6 years ago
Task :app:compileDebugJavaWithJavac FAILED
/Users/pc1/Desktop/project/android/app/src/main/java/com/pjapp/MainApplication.java:34: error: cannot find symbol new PjSipModulePackage(), ^ symbol: class PjSipModulePackage /Users/pc1/Desktop/project/android/app/src/main/java/com/pjapp/MainApplication.java:35: error: cannot find symbol new LinearGradientPackage() ^ symbol: class LinearGradientPackage Note: /Users/pc1/Desktop/project/android/app/src/main/java/com/pjapp/MainActivity.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. 2 errors
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 4m 38s 15 actionable tasks: 1 executed, 14 up-to-date Could not install the app on the device, read the error above for details. Make sure you have an Android emulator running or a device connected and have set up your Android development environment: https://facebook.github.io/react-native/docs/getting-started.html
Command failed: ./gradlew installDebug
Error: Command failed: ./gradlew installDebug at checkExecSyncError (child_process.js:611:11) at Object.execFileSync (child_process.js:629:13) at runOnAllDevices (/Users/pc1/Desktop/project/node_modules/react-native/local-cli/runAndroid/runAndroid.js:299:19) at buildAndRun (/Users/pc1/Desktop/project/node_modules/react-native/local-cli/runAndroid/runAndroid.js:135:12) at isPackagerRunning.then.result (/Users/pc1/Desktop/project/node_modules/react-native/local-cli/runAndroid/runAndroid.js:65:12) at process._tickCallback (internal/process/next_tick.js:68:7)
Is anyone there to help me with this matter.
Thank You.
Any update on this ? I am facing the same issue as well.
Sure, I am solved this problem just by change my android/build.gradle file like following. Set this code in android/build.gradle Inside allprojects, allprojects { subprojects { afterEvaluate { project -> if (project.hasProperty("android")) { android { compileSdkVersion = 27 buildToolsVersion = "27.0.3" } } } }
}
And for react native v0.59+ update buildToolsVersion to 28
subprojects {
afterEvaluate {
project ->
if (project.hasProperty("android")) {
android {
compileSdkVersion = 28
buildToolsVersion = "28.0.3"
}
}
}
}
:react-native-pjsip:processReleaseResources :react-native-pjsip:generateReleaseSources :react-native-pjsip:processReleaseJavaRes UP-TO-DATE :react-native-pjsip:compileReleaseJavaWithJavacC:\Users\mouni\react-native-pjsip-app\node_modules\react-native-pjsip\android\src\main\java\com\carusto\ReactNativePjSip\PjActions.java:307: error: cannot find symbol value.put(mapKey, map.getArray(mapKey).toArrayList()); ^ symbol: method toArrayList() location: interface ReadableArray C:\Users\mouni\react-native-pjsip-app\node_modules\react-native-pjsip\android\src\main\java\com\carusto\ReactNativePjSip\PjSipModulePackage.java:12: error: PjSipModulePackage is not abstract and does not override abstract method createJSModules() in ReactPackage public class PjSipModulePackage implements ReactPackage { ^ Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 2 errors FAILED
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':react-native-pjsip:compileReleaseJavaWithJavac'.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 1 mins 23.904 secs Could not install the app on the device, read the error above for details. Make sure you have an Android emulator running or a device connected and have set up your Android development environment: https://facebook.github.io/react-native/docs/android-setup.html