-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Closed
Labels
Needs: Author FeedbackNeeds: ReproThis issue could be improved with a clear list of steps to reproduce the issue.This issue could be improved with a clear list of steps to reproduce the issue.Needs: Version InfoPlatform: AndroidAndroid applications.Android applications.
Description
Description
import com.brentvatne.react.ReactVideoPackage
...
override fun getPackages(): ArrayList<ReactPackage> {
packages.add(new ReactVideoPackage())
// Packages that cannot be autolinked yet can be added manually here, for example:
// packages.add(new MyReactNativePackage());
return PackageList(this).packages
}
When I try to add new package to getPackages method in android, I have crash a build with error
file:///Users/username/Desktop/projectName/android/app/src/main/java/com/projectName/MainApplication.kt:44:26 Unresolved reference: new
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
> Compilation error. See log for more details
Steps to reproduce
yarn android
React Native Version
0.73
Affected Platforms
Runtime - Android
Output of npx react-native info
emulator pixel 4
Stacktrace or Logs
Note: Recompile with -Xlint:unchecked for details.
e: file:///Users/user/Desktop/projectName/android/app/src/main/java/com/projectName/MainApplication.kt:44:48 Expecting an expression
e: file:///Users/user/Desktop/projectName/android/app/src/main/java/com/projectName/MainApplication.kt:44:26 Unresolved reference: new
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
> Compilation error. See log for more 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.
Reproducer
Screenshots and Videos
No response
Metadata
Metadata
Assignees
Labels
Needs: Author FeedbackNeeds: ReproThis issue could be improved with a clear list of steps to reproduce the issue.This issue could be improved with a clear list of steps to reproduce the issue.Needs: Version InfoPlatform: AndroidAndroid applications.Android applications.