`compileDebugKotlin FAILED`
Just setup a new React Native project using expo (expo init ., template: "minimal") and ejected it (expo eject). Installed react-native-tor and tried to run yarn android but got these errors:
> Task :react-native-tor:compileDebugKotlin FAILED
e: /home/myzel394/VSCodeProjects/react-native-map/node_modules/react-native-tor/android/src/main/java/com/reactnativetor/TorBridgeRequest.kt: (7, 26): Unresolved reference: Companion
e: /home/myzel394/VSCodeProjects/react-native-map/node_modules/react-native-tor/android/src/main/java/com/reactnativetor/TorBridgeRequest.kt: (8, 28): Unresolved reference: Companion
e: /home/myzel394/VSCodeProjects/react-native-map/node_modules/react-native-tor/android/src/main/java/com/reactnativetor/TorBridgeRequest.kt: (60, 26): Unresolved reference: toRequestBody
e: /home/myzel394/VSCodeProjects/react-native-map/node_modules/react-native-tor/android/src/main/java/com/reactnativetor/TorBridgeRequest.kt: (60, 91): Unresolved reference: toMediaType
e: /home/myzel394/VSCodeProjects/react-native-map/node_modules/react-native-tor/android/src/main/java/com/reactnativetor/TorBridgeRequest.kt: (61, 32): Unresolved reference: toRequestBody
e: /home/myzel394/VSCodeProjects/react-native-map/node_modules/react-native-tor/android/src/main/java/com/reactnativetor/TorBridgeRequest.kt: (61, 80): Unresolved reference: toMediaType
e: /home/myzel394/VSCodeProjects/react-native-map/node_modules/react-native-tor/android/src/main/java/com/reactnativetor/TorBridgeRequest.kt: (82, 16): Cannot access 'headers': it is public/*package*/ in 'Response'
e: /home/myzel394/VSCodeProjects/react-native-map/node_modules/react-native-tor/android/src/main/java/com/reactnativetor/TorBridgeRequest.kt: (87, 31): Cannot access 'code': it is public/*package*/ in 'Response'
e: /home/myzel394/VSCodeProjects/react-native-map/node_modules/react-native-tor/android/src/main/java/com/reactnativetor/TorBridgeRequest.kt: (91, 27): Cannot access 'body': it is public/*package*/ in 'Response'
e: /home/myzel394/VSCodeProjects/react-native-map/node_modules/react-native-tor/android/src/main/java/com/reactnativetor/TorBridgeRequest.kt: (102, 20): Cannot access 'code': it is public/*package*/ in 'Response'
Hi @Myzel394 thanks for submitting this issue. What version of RN are you on ?
Here are all my dependencies:
"dependencies": {
"expo": "~44.0.2",
"expo-splash-screen": "~0.14.1",
"expo-status-bar": "~1.2.0",
"react": "17.0.1",
"react-dom": "17.0.1",
"react-native": "0.64.3",
"react-native-tor": "^0.1.8",
"react-native-web": "0.17.1"
}
i have this issue too it happened when you don't use typescript template
here is more details
Subproject ':react-native-tor' has location '/home/.../Android-Tools/final-music/FinalMusic/node_modules/react-native-tor/android' which is outside of the project root. This behaviour has been deprecated and is scheduled to be removed in Gradle 8.0. Consult the upgrading guide for further information: https://docs.gradle.org/7.3.3/userguide/upgrading_version_7.html#deprecated_flat_project_structure
The RepositoryHandler.jcenter() method has been deprecated. This is scheduled to be removed in Gradle 8.0. JFrog announced JCenter's sunset in February 2021. Use mavenCentral() instead. Consult the upgrading guide for further information: https://docs.gradle.org/7.3.3/userguide/upgrading_version_6.html#jcenter_deprecation
at build_c0i6b7jid8dpzuvuulvbjzx8z$_run_closure1$_closure2.doCall(/home/.../Android-Tools/final-music/FinalMusic/node_modules/react-native-tor/android/build.gradle:7)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
Adding a Configuration as a dependency is a confusing behavior which isn't recommended. This behaviour has been deprecated and is scheduled to be removed in Gradle 8.0. If you're interested in inheriting the dependencies from the Configuration you are adding, you should use Configuration#extendsFrom instead. See https://docs.gradle.org/7.3.3/dsl/org.gradle.api.artifacts.Configuration.html#org.gradle.api.artifacts.Configuration:extendsFrom(org.gradle.api.artifacts.Configuration[]) for more details.```
@davoodghaffarilive Just a quick hint: You can format block codes using three backticks at the beginning and at the end of your code
```javascript Your code here ```
results in:
Your code here
Thank you :+1: i think its for gradle Version i tested it with gradle v 6 and its worked
@davoodghaffarilive How do you change the gradle version?
@Myzel394 i download it from this repo -> example folder -> gradle files :)
its work fine with gradle version 6.9