Comments (20)
Ok I found a solution to this.
For people facing the same problem in the future, here's what I did:
I added the following to my root build gradle android/build.gradle
(Not the android/app/build.gradle)
subprojects {
afterEvaluate {project ->
if (project.hasProperty("android")) {
android {
compileSdkVersion 25
buildToolsVersion '25.0.0'
}
}
}
}
That forces all the submodules to use the specified compileSdkVersion
and buildToolsVersion
.
Problem gone now.
from react-native-keychain.
@SudoPlz Check your android/build.gradle
I moved files from a project to an older and I haved to downgrade my build gradle version from 2.3.2 to 2.2.3
dependencies {
// classpath 'com.android.tools.build:gradle:2.3.2' //before
classpath 'com.android.tools.build:gradle:2.2.3' //to solve problem
}
from react-native-keychain.
That's a good question @gungungun93.
The solution above is not ideal, but works.
Everyone should take a look at the libraries they're using, and find the lowest common denominator version to use for all projects.
It would be cool if someone wrote a script that checks the module name with a simple if clause, and allows people to manually define the version of each and every dependency individually.
I might do that myself, but I have zero time at the moment.
from react-native-keychain.
Will the future code look like this? The file path is android/build.gradle
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenLocal()
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
}
}
subprojects {
afterEvaluate {project ->
if (project.hasProperty("android")) {
android {
compileSdkVersion 25
buildToolsVersion '25.0.0'
}
}
}
}
from react-native-keychain.
If you have Android Studio, just import your project into the IDE, and then a warning about this error will be showed. Just click on the link "Update SDK". And it is solved without forcing any library to use a downgraded version of the SDK.
from react-native-keychain.
@SudoPlz Thank you for sharing this solution for us
but I have a question if you don't mind. by following your solution, all packages which use compileSdkVersion lower than 25 will be forced to use 25. What if some packages are not compatible with the newer version? For instance, Facebook-login. Thank you.
from react-native-keychain.
We've been clicking "Update build tools and rebuild" for like 15 libs on android studio for months now...haha. So, yes.
from react-native-keychain.
Ok I found a solution to this.
For so many peoples facing the same problem in the future, here's what I did:
I added the following to my root build gradle android/build.gradle
(Not the android/app/build.gradle)
subprojects {
afterEvaluate {project ->
if (project.hasProperty("android")) {
android {
compileSdkVersion 25 0r 26
buildToolsVersion '25.0.0'
}
}
}
}
its working good
from react-native-keychain.
saved the day ! Thanks.
from react-native-keychain.
Thank you very much @SudoPlz
from react-native-keychain.
@SudoPlz after I have added the lines to force the submodules to use the specified compileSdkVersion , the build problem is gone. But the application is showing message "unfortunately app has stopped". how would I solve it, has anyone faced this issue?
from react-native-keychain.
Hmm, no, I didn't have any problems.
It could be that one of your modules requires an sdk version higher than 25.
from react-native-keychain.
@SudoPlz thanks for your quick reply.
Here are my dependencies:
"dependencies": {
"react": "16.0.0-alpha.12",
"react-native": "0.45.1",
"react-native-blur": "^3.1.2",
"react-native-google-places": "^2.1.0",
"react-native-keyboard-aware-scroll-view": "^0.2.9",
"react-native-vector-icons": "^4.2.0",
"react-navigation": "^1.0.0-beta.11"
},
So what can i do to ?
from react-native-keychain.
Well I'd check each of those projects dependencies to see the minimum sdk they support.
i.e react-native-blur requires version 16 or higher so that's not the problem.
Just a suggestion.
from react-native-keychain.
@SudoPlz you are a godsend
from react-native-keychain.
No probs @tomauty I hope that helped :)
from react-native-keychain.
@flaviocolonna That works if you're building locally, but not if your build is on a CI.
from react-native-keychain.
@SudoPlz Simply Awesome. You are a life saver for all
from react-native-keychain.
No problem man, I'm glad this works for you.
from react-native-keychain.
after i upgrade version to 25.0.2 , DEX error is coming ,
from react-native-keychain.
Related Issues (20)
- Encrypt and decrypt failing on latest Samsung OS HOT 11
- Warning when using SetGenericPassword with service HOT 2
- No podspec found for `RNKeychain`
- Fingerprint Bypass using Frida and Objection techniques HOT 1
- Using it together with native iOS project HOT 2
- Android crash from adding react-native-keychain package HOT 1
- Unrecognized platform name visionOS error HOT 8
- iOS & android keychain items are not erased when the app is uninstalled HOT 1
- Pods install failed with Invalid `RNKeychain.podspec` file: undefined method `visionos' for #<Pod::Specification name="RNKeychain" HOT 5
- App crash on launch - Only happens on Huawei devices
- Replace `SharedPreferences` with `DataStore` Preferences on Android HOT 2
- Cold start on android took 5-10 seconds longer than before the library update HOT 11
- Example project not building iOS HOT 3
- [RN-Android]: Not able to retrieve credentials from App B after storing credentials from App A. HOT 1
- Android build failed after upgrading to java 21
- Issue building app 8.1.2, 8.1.2 and 8.2.0 HOT 1
- Understanding the key store access life cycle.
- [Enhancement] Support for Passkey
- UI animation freezing when calling any `set` functions in Android HOT 1
- Does React Native Keychain use iOS Keychain and Android Keystore under the hood? HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-keychain.