You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: hello-swift-java/README.md
+9-6Lines changed: 9 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -95,18 +95,21 @@ We encourage exploring `swift-java` by writing Swift code to the file `hello-swi
95
95
96
96
Once the `hashing-app` build completes, the newly generated Java code will be available to use in the Android project.
97
97
98
-
While exploring, some errors might occur. Following is a list of errors and how to troubleshoot them.
99
-
>⚠️⚠️ These are temporary and will not be required once the gradle plugin is automated ⚠️⚠️
98
+
## Troubleshooting
99
+
100
+
> Most of these issues are temporary and will be resolved in the future as the swift-java project matures and automates more of the build steps.
101
+
100
102
101
103
___
102
-
### Swift/Java not available for use once Android build completes:
104
+
### New Swift Code is not available in Java once Android build completes:
103
105
If after adding new code to `SwiftHashing.swift` the same is not available on Android after a build, please delete the swift `.build` folder located at `hello-swift-java/hashing-lib/.build` (Attention to the dot before the folder name `.build`)
104
106
105
-
Build the Android `hashing-app` target again and the code should be avilable.
107
+
Build the Android `hashing-app` target again and the Swift API should be available in Java.
108
+
If the code is still not available, the `swift-java` project might not support the specific Swift code. Please make sure the feature is listed as supported in the [Supported Features](https://swiftpackageindex.com/swiftlang/swift-java/main/documentation/swiftjavadocumentation/supportedfeatures#JExtract-calling-Swift-from-Java) documentation.
106
109
107
110
---
108
-
### Crash: Library not found
109
-
If the code added to `SwiftHashing.swift` introduces a new library dependency, and the app is crashing with the following error:\
111
+
#### Crash: Library not found
112
+
If the code added to `SwiftHashing.swift` introduces a new library dependency, forexample `import Observation`, and the app crashes with the following error:\
110
113
`Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: library "libswiftObservation.so" not found`
111
114
1. Locate the file `build.gradle (Module :hello-swift-java-hashing-lib`
112
115
2. Locate the defined list of libraries `def swiftRuntimeLibs`
0 commit comments