Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compileDebugKotlin FAILED #46

Open
Myzel394 opened this issue Apr 28, 2022 · 9 comments
Open

compileDebugKotlin FAILED #46

Myzel394 opened this issue Apr 28, 2022 · 9 comments

Comments

@Myzel394
Copy link

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'
@gabidi
Copy link
Contributor

gabidi commented Apr 29, 2022

Hi @Myzel394 thanks for submitting this issue. What version of RN are you on ?

@Myzel394
Copy link
Author

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"
}

@davoodghaffarilive
Copy link

davoodghaffarilive commented Apr 29, 2022

i have this issue too
it happened when you don't use typescript template

@davoodghaffarilive
Copy link

davoodghaffarilive commented Apr 29, 2022

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.```

@Myzel394
Copy link
Author

Myzel394 commented Apr 29, 2022

@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

@davoodghaffarilive
Copy link

Thank you 👍
i think its for gradle Version
i tested it with gradle v 6 and its worked

@Myzel394
Copy link
Author

@davoodghaffarilive How do you change the gradle version?

@davoodghaffarilive
Copy link

@Myzel394 i download it from this repo -> example folder -> gradle files :)

@davoodghaffarilive
Copy link

its work fine with gradle version 6.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants