sAleksovski / react-native-android-widget

Build Android Widgets with React Native

Home Page:https://sAleksovski.github.io/react-native-android-widget/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react native 0.69 support?(Unable to determine the current character, it is not a string, number, array, or object)

chenkuangkuang opened this issue · comments

We are using react native 0.69, and after installed this package, the app cannot run.

The error is "Unable to determine the current character, it is not a string, number, array, or object", which is a issue in react-native-community.I donnot konw which package caused this error, but it can work after I uninstalled your package.

So I think may this package donot support react native 0.69, any suggestions?

I just released 0.8.2, can you try again?

@sAleksovski failed

Task :react-native-android-widget:compileDebugJavaWithJavac FAILED

Task :expo-modules-core:compileDebugKotlin
w: Argument -Xopt-in is deprecated. Please use -opt-in instead
w: D:\works\myapp.rn\node_modules\expo-modules-core\android\src\main\java\expo\modules\adapters\react\permissions\PermissionsService.kt: (157, 30): 'getPackageInfo(String, Int): PackageInfo!' is deprecated. Deprecated in Java
w: D:\works\myapp.rn\node_modules\expo-modules-core\android\src\main\java\expo\modules\kotlin\activityresult\ActivityResultsManager.kt: (52, 24): Parameter 'activity' is never used
w: D:\works\myapp.rn\node_modules\expo-modules-core\android\src\main\java\expo\modules\kotlin\activityresult\AppContextActivityResultRegistry.kt: (119, 51): 'getParcelableExtra(String!): T?' is deprecated. Deprecated in Java
w: D:\works\myapp.rn\node_modules\expo-modules-core\android\src\main\java\expo\modules\kotlin\activityresult\AppContextActivityResultRegistry.kt: (180, 26): 'getParcelable(String?): T?' is deprecated. Deprecated in Java
w: D:\works\myapp.rn\node_modules\expo-modules-core\android\src\main\java\expo\modules\kotlin\activityresult\AppContextActivityResultRegistry.kt: (271, 83): 'getParcelable(String?): T?' is deprecated. Deprecated in Java
w: D:\works\myapp.rn\node_modules\expo-modules-core\android\src\main\java\expo\modules\kotlin\activityresult\DataPersistor.kt: (67, 20): 'getSerializable(String?): Serializable?' is deprecated. Deprecated in Java
w: D:\works\myapp.rn\node_modules\expo-modules-core\android\src\main\java\expo\modules\kotlin\activityresult\DataPersistor.kt: (85, 26): 'getSerializable(String?): Serializable?' is deprecated. Deprecated in Java
w: D:\works\myapp.rn\node_modules\expo-modules-core\android\src\main\java\expo\modules\kotlin\events\KModuleEventEmitterWrapper.kt: (9, 44): 'RCTEventEmitter' is deprecated. Deprecated in Java
w: D:\works\myapp.rn\node_modules\expo-modules-core\android\src\main\java\expo\modules\kotlin\events\KModuleEventEmitterWrapper.kt: (94, 7): 'constructor Event<T : Event<(raw) Event<*>>!>(Int)' is deprecated. Deprecated in Java
w: D:\works\myapp.rn\node_modules\expo-modules-core\android\src\main\java\expo\modules\kotlin\events\KModuleEventEmitterWrapper.kt: (98, 44): 'RCTEventEmitter' is deprecated. Deprecated in Java
w: D:\works\myapp.rn\node_modules\expo-modules-core\android\src\main\java\expo\modules\kotlin\events\KModuleEventEmitterWrapper.kt: (99, 23): 'receiveEvent(Int, String!, WritableMap?): Unit' is deprecated. Deprecated in Java
w: D:\works\myapp.rn\node_modules\expo-modules-core\android\src\main\java\expo\modules\kotlin\jni\JavaScriptObject.kt: (59, 33): Parameter 'null' is never used
w: D:\works\myapp.rn\node_modules\expo-modules-core\android\src\main\java\expo\modules\kotlin\jni\JavaScriptObject.kt: (100, 5): Parameter 'null' is never used
w: D:\works\myapp.rn\node_modules\expo-modules-core\android\src\main\java\expo\modules\kotlin\types\JSTypeConverterHelper.kt: (40, 17): 'get(String!): Any?' is deprecated. Deprecated in Java
w: Detected multiple Kotlin daemon sessions at build\kotlin\sessions

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.5/userguide/command_line_interface.html#sec:command_line_warnings

Execution optimizations have been disabled for 1 invalid unit(s) of work during this build to ensure correctness.
Please consult deprecation warnings for more details.
539 actionable tasks: 532 executed, 7 up-to-date
D:\works\myapp.rn\node_modules\react-native-android-widget\android\src\main\java\com\reactnativeandroidwidget\RNWidgetConfigurationActivity.java:14: ����: �����com.facebook.react.defaults������
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
^
D:\works\myapp.rn\node_modules\react-native-android-widget\android\src\main\java\com\reactnativeandroidwidget\RNWidgetConfigurationActivity.java:15: ����: �����com.facebook.react.defaults������
import com.facebook.react.defaults.DefaultReactActivityDelegate;
^
D:\works\myapp.rn\node_modules\react-native-android-widget\android\src\main\java\com\reactnativeandroidwidget\RNWidgetConfigurationActivity.java:45: ����: �Ҳ�������
return new DefaultReactActivityDelegate(
^
����: �� DefaultReactActivityDelegate
�: �� RNWidgetConfigurationActivity
D:\works\myapp.rn\node_modules\react-native-android-widget\android\src\main\java\com\reactnativeandroidwidget\RNWidgetConfigurationActivity.java:52: ����: �������Ḳ�ǻ�ʵ�ֳ����͵ķ���
@OverRide
^
D:\works\myapp.rn\node_modules\react-native-android-widget\android\src\main\java\com\reactnativeandroidwidget\RNWidgetConfigurationActivity.java:48: ����: �Ҳ�������
DefaultNewArchitectureEntryPoint.getFabricEnabled(),
^
����: ���� DefaultNewArchitectureEntryPoint
�: �� RNWidgetConfigurationActivity
D:\works\myapp.rn\node_modules\react-native-android-widget\android\src\main\java\com\reactnativeandroidwidget\RNWidgetConfigurationActivity.java:50: ����: �Ҳ�������
DefaultNewArchitectureEntryPoint.getConcurrentReactEnabled()) {
^
����: ���� DefaultNewArchitectureEntryPoint
�: �� RNWidgetConfigurationActivity
ע: D:\works\myapp.rn\node_modules\react-native-android-widget\android\src\main\java\com\reactnativeandroidwidget\RNWidgetCollectionService.javaʹ�û򸲸����ѹ�ʱ�� API��
ע: �й���ϸ��Ϣ, ��ʹ�� -Xlint:deprecation ���±��롣
6 ������

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':react-native-android-widget: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.

BUILD FAILED in 1m 46s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
D:\works\myapp.rn\node_modules\react-native-android-widget\android\src\main\java\com\reactnativeandroidwidget\RNWidgetConfigurationActivity.java:14: ����: �����com.facebook.react.defaults������
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
^
D:\works\myapp.rn\node_modules\react-native-android-widget\android\src\main\java\com\reactnativeandroidwidget\RNWidgetConfigurationActivity.java:15: ����: �����com.facebook.react.defaults������
import com.facebook.react.defaults.DefaultReactActivityDelegate;
^
D:\works\myapp.rn\node_modules\react-native-android-widget\android\src\main\java\com\reactnativeandroidwidget\RNWidgetConfigurationActivity.java:45: ����: �Ҳ�������
return new DefaultReactActivityDelegate(
^
����: �� DefaultReactActivityDelegate
�: �� RNWidgetConfigurationActivity
D:\works\myapp.rn\node_modules\react-native-android-widget\android\src\main\java\com\reactnativeandroidwidget\RNWidgetConfigurationActivity.java:52: ����: �������Ḳ�ǻ�ʵ�ֳ����͵ķ���
@OverRide
^
D:\works\myapp.rn\node_modules\react-native-android-widget\android\src\main\java\com\reactnativeandroidwidget\RNWidgetConfigurationActivity.java:48: ����: �Ҳ�������
DefaultNewArchitectureEntryPoint.getFabricEnabled(),
^
����: ���� DefaultNewArchitectureEntryPoint
�: �� RNWidgetConfigurationActivity
D:\works\myapp.rn\node_modules\react-native-android-widget\android\src\main\java\com\reactnativeandroidwidget\RNWidgetConfigurationActivity.java:50: ����: �Ҳ�������
DefaultNewArchitectureEntryPoint.getConcurrentReactEnabled()) {
^
����: ���� DefaultNewArchitectureEntryPoint
�: �� RNWidgetConfigurationActivity
ע: D:\works\myapp.rn\node_modules\react-native-android-widget\android\src\main\java\com\reactnativeandroidwidget\RNWidgetCollectionService.javaʹ�û򸲸����ѹ�ʱ�� API��
ע: �й���ϸ��Ϣ, ��ʹ�� -Xlint:deprecation ���±��롣
6 ������

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':react-native-android-widget:compileDebugJavaWithJavac'.

Compilation failed; see the compiler error output for details.

Looks like the build supports 0.69, but not the code in RNWidgetConfigurationActivity.

I'm not sure how I can update it so it can works with 0.69, while continuing to work with the newer versions.

I would suggest to either:

  • Use 0.6.2 if you don't need the configuration activity
  • Upgrade to newer React Native version
  • Use patch-package to patch the code in RNWidgetConfigurationActivity with React Native 0.69 compatible code