-
Notifications
You must be signed in to change notification settings - Fork 52
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
View does not build on Android with React Native 0.60(+) #29
Labels
bug
Something isn't working
Comments
brody4hire
added
bug
Something isn't working
help wanted
Extra attention is needed
labels
Jul 11, 2019
This was referenced Jul 11, 2019
Merged
The following update seems to solve this issue: diff --git a/templates/android.js b/templates/android.js
index c9e0648..f2b235a 100644
--- a/templates/android.js
+++ b/templates/android.js
@@ -179,7 +179,7 @@ public class ${name}Module extends ReactContextBaseJavaModule {
import android.view.View;
-import android.support.v7.widget.AppCompatCheckBox;
+import androidx.appcompat.widget.AppCompatCheckBox;
import com.facebook.react.uimanager.SimpleViewManager;
import com.facebook.react.uimanager.ThemedReactContext; This change should be applied to a generated View project if it is needed for React Native 0.60(+) on Android. Unfortunately this update would cause a similar failure on React Native pre-0.60. I hope we can drop support for RN pre-0.60 someday. |
brody4hire
pushed a commit
that referenced
this issue
Aug 4, 2019
brody4hire
changed the title
View does not build on Android with React Native 0.60
View does not build on Android with React Native 0.60(+)
Sep 9, 2019
5 tasks
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
create-react-native-module
version:0.5.0
Command used to generate view module with example:
Build output from
react-native run-android
in generatedexample
:Related to #25 (updates for React Native 0.60)
P.S. I think the underlying cause is using importing
AppCompatCheckBox
fromandroid.support.v7.widget
, which seems to be not included by default when using React Native 0.60. Any help with a simple, clean workaround solution to get a sample widget working on recent versions of React Native would be highly appreciated. Doesn’t matter so much which widget, no need for consistency with iOS, just to get this working.The text was updated successfully, but these errors were encountered: