Survicate React-Native error: cannot find symbol Survicate.Survicate.setWorkspaceKey(workspaceKey);
Survicate React-Native error: cannot find symbol Survicate.Survicate.setWorkspaceKey(workspaceKey);
按照文档上的说明进行操作后:https://github.com/Survicate/react-native-survicate 我在 Android 上构建失败:
error: cannot find symbol
Survicate.Survicate.setWorkspaceKey(workspaceKey);
^
symbol: variable Survicate
location: class Survicate
1 error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':survicate_react-native-survicate: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 52s
Info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Survicate</key>
<dict/>
<key>WorkspaceKey</key>
<string>...</string>
...
</dict>
</plist>
AndroidManifest.xml
<meta-data android:name="com.survicate.surveys.workspaceKey" android:value="..."/>
App.js
import Survicate from '@survicate/react-native-survicate'
const App = () => {
Survicate.initialize()
Survicate.invokeEvent('test')
Survicate.enterScreen('testScreen')
...
}
在 IOS 构建成功,但 Survicate 不工作,我确实在 Survicate 的面板上创建了一个调查,并激活了它。
请帮忙!
1.1.1 版修复了这个问题。请更新依赖。
按照文档上的说明进行操作后:https://github.com/Survicate/react-native-survicate 我在 Android 上构建失败:
error: cannot find symbol
Survicate.Survicate.setWorkspaceKey(workspaceKey);
^
symbol: variable Survicate
location: class Survicate
1 error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':survicate_react-native-survicate: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 52s
Info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Survicate</key>
<dict/>
<key>WorkspaceKey</key>
<string>...</string>
...
</dict>
</plist>
AndroidManifest.xml
<meta-data android:name="com.survicate.surveys.workspaceKey" android:value="..."/>
App.js
import Survicate from '@survicate/react-native-survicate'
const App = () => {
Survicate.initialize()
Survicate.invokeEvent('test')
Survicate.enterScreen('testScreen')
...
}
在 IOS 构建成功,但 Survicate 不工作,我确实在 Survicate 的面板上创建了一个调查,并激活了它。 请帮忙!
1.1.1 版修复了这个问题。请更新依赖。