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

Build error on react-native 0.69.5 #40

Open
yepMad opened this issue Sep 24, 2022 · 5 comments
Open

Build error on react-native 0.69.5 #40

yepMad opened this issue Sep 24, 2022 · 5 comments

Comments

@yepMad
Copy link

yepMad commented Sep 24, 2022

When "./gradlew assembleRelease" I get this error:

> Task :react-native-text-size:compileReleaseJavaWithJavac
Note: C:\Users\MyUser\Documents\Git\my-app\node_modules\react-native-text-size\android\src\main\java\com\github\amarcruz\rntextsize\RNTextSizeModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
@yepMad
Copy link
Author

yepMad commented Sep 24, 2022

After doing the manual installation the error was solved. This leads me to believe that autolinking is not working.

@yepMad
Copy link
Author

yepMad commented Sep 24, 2022

But... When trying to open the app build:

image

When skip step 1 of manual, just doing 2 and 3 everything is fine. So just don't follow Android step one and everything should be fine.

@natioskar
Copy link

Hey @yepMad did the library ended up working for you? the steps for the manual linking are not working for me unfortunately

@yepMad
Copy link
Author

yepMad commented Dec 3, 2022

When skip step 1 of manual, just doing 2 and 3 everything is fine.

It worked on Android, but I chose not to use it, it has major linking problems on iOS. As for it working on Android, I recommend that you follow what I quickly commented in the previous comment: "When skip step 1 of manual, just doing 2 and 3."

If that doesn't work, let me know and I'll be happy to provide a sample demo.

@natioskar
Copy link

natioskar commented Dec 3, 2022

I managed to make it work properly on iOS by applying a patch as shown in this PR

diff --git a/node_modules/react-native-text-size/ios/RNTextSize.podspec b/node_modules/react-native-text-size/RNTextSize.podspec
similarity index 89%
rename from node_modules/react-native-text-size/ios/RNTextSize.podspec
rename to node_modules/react-native-text-size/RNTextSize.podspec
index 281e201..da929db 100644
--- a/node_modules/react-native-text-size/ios/RNTextSize.podspec
+++ b/node_modules/react-native-text-size/RNTextSize.podspec
@@ -1,5 +1,5 @@
 require 'json'
-package = JSON.parse(File.read('../package.json'))
+package = JSON.parse(File.read('./package.json'))
 
 Pod::Spec.new do |s|
   s.name         = 'RNTextSize'
@@ -14,7 +14,7 @@ Pod::Spec.new do |s|
   s.author       = package['author']
   s.platform     = :ios, '9.0'
   s.source       = { :git => package['repository'], :tag => "v#{s.version}" }
-  s.source_files = '*.{h,m}'
+  s.source_files = 'ios/*.{h,m}'
   s.requires_arc = true
 
   s.dependency 'React'

or like this - #38 (comment)

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

2 participants