Giter Site home page Giter Site logo

mikehardy / react-native-update-apk Goto Github PK

View Code? Open in Web Editor NEW
194.0 3.0 57.0 1.44 MB

Update apk from non-play store servers, and update ios from app store in React Native.

License: MIT License

Java 39.25% JavaScript 26.74% Objective-C 6.05% Shell 4.87% Ruby 3.16% Starlark 0.95% CMake 0.43% C++ 11.52% Objective-C++ 7.02%

react-native-update-apk's Introduction

React Native Update APK

npm version npm total downloads npm monthly downloads npm weekly downloads

Easily check for new APKs and install them in React Native.

Installation

npm install rn-update-apk --save

Manual steps for Android

  1. FileProviders: Android API24+ requires the use of a FileProvider to share "content" (like downloaded APKs) with other applications (like the system installer, to install the APK update). So you must add a FileProvider entry to your AndroidManifest.xml, and it will reference a "filepaths" XML file. Both are demonstrated in the example as linked here.

  2. Permissions For Android 25+ you need to add REQUEST_INSTALL_PACKAGES to your AndroidManifest.xml

Please install and run the example to see how it works before opening issues. Then adapt it into your own app. Getting the versions right is tricky and setting up FileProviders is very easy to do incorrectly, especially if using another module that defines one (like rn-fetch-blob)

Usage

Please see the example App.js as it is very full featured and has very thorough documentation about what each feature is for. You just need to check out the module from github, cd example && npm install && npm start then react-native run-android in another terminal with an emulator up to see everything in action.

Changelog

See the Changelog on github

Testing

This application has been tested on API21+. Older versions of this library also supported API16-20 with HTTPS updates working via a patch to SSL services achieved via Google Play Services. This has been removed now that react-native only supports API21+. Use older versions if you support API16-20.

Version JSON example

Note that you can host tests on dropbox.com using their "shared links", but if you do so will need to put '?raw=1' at the end of the link they give you so you get the raw file contents instead of a non-JSON XML document

// version.json example
// Note you will need to verify SSL works for Android <5 as it has SSL Protocol bugs
// If it doesn't then you may be able to use Google Play Services to patch the SSL Provider, or just serve your updates over HTTP for Android <5
// https://stackoverflow.com/a/36892715
{
  "versionName":"1.0.0",
  "apkUrl":"https://github.com/NewApp.apk",
  "forceUpdate": false,
  "whatsNew": "<< what changes the app update will bring >>"
}

Library Dependency

  • react-native-fs

react-native-update-apk's People

Contributors

cenkakin avatar dependabot[bot] avatar gaodeng avatar gstcyr avatar ismaeldcom avatar jeremyzheng avatar mikehardy avatar nuks avatar parryworld avatar rejunges avatar zhpeng8775 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

react-native-update-apk's Issues

Typescript support

Hi! Could be possible to add support for typescript? Tried to use the library and @types weren't found

Switch to download provider that handles TLS correctly

#11 is a workaround that uses Play Services. But if you want to use a non-play-services workaround you either need to use OkHTTP or a downloader that uses the default react-native fetch but with conscrypt bundled with the app.

react-native-fs does not seem to respond - itinance/react-native-fs#577 - so perhaps rn-fetch-blob or similar would be better. Ideally one that could resume partial downloads if possible

Help needed

Im having trouble installing the require dependency on my project. please have a look

warn Calling react-native link [packageName] is deprecated in favor of autolinking. It will be removed in the next major release.
Autolinking documentation: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md
error Unknown dependency. Make sure that the package you are trying to link is already installed in your "node_modules" and present in your "package.json" dependencies. Run CLI with --verbose flag for more details.
Waiting for the debugger to disconnect...
npm ERR! code 1
npm ERR! path D:\Projects\NovelManager
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c react-native link react-native-fs

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\alen\AppData\Local\npm-cache\_logs\2021-01-31T22_59_45_045Z-debug.log
Waiting for the debugger to disconnect...
PS D:\Projects\NovelManager> npm i react-native-fs
Debugger attached.
npm ERR! code ERESOLVE
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react-native
npm ERR!   react-native@"^0.63.4" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-native@"^0.59.5" from [email protected]
npm ERR! node_modules/react-native-fs
npm ERR!   react-native-fs@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\alen\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\alen\AppData\Local\npm-cache\_logs\2021-01-31T23_00_09_833Z-debug.log
Waiting for the debugger to disconnect...
PS D:\Projects\NovelManager> npm install react-native-fs --save
Debugger attached.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react-native
npm ERR!   react-native@"^0.63.4" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-native@"^0.59.5" from [email protected]
npm ERR! node_modules/react-native-fs
npm ERR!   react-native-fs@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

Package.json

  "dependencies": {
    "@expo/metro-config": "^0.1.52",
    "@react-native-community/masked-view": "^0.1.10",
    "@react-navigation/bottom-tabs": "^5.11.7",
    "@react-navigation/material-top-tabs": "^5.3.13",
    "@react-navigation/native": "^5.9.2",
    "@react-navigation/stack": "^5.14.2",
    "eslint-plugin-react-hooks": "^4.2.0",
    "expo": "^40.0.1",
    "expo-asset": "^8.2.2",
    "expo-document-picker": "^8.4.1",
    "expo-file-system": "~9.3.0",
    "expo-media-library": "~10.0.0",
    "expo-notifications": "^0.8.2",
    "expo-sqlite": "^9.0.0",
    "i": "^0.3.6",
    "install": "^0.13.0",
    "node-html-parser": "^2.0.2",
    "npm": "^6.14.11",
    "react": "~16.13.1",
    "react-native": "^0.63.4",
    "react-native-eject": "^0.1.2",
    "react-native-elements": "^3.1.0",
    "react-native-gesture-handler": "^1.9.0",
    "react-native-pin-parallax-view": "^0.0.6",
    "react-native-progress": "^4.1.2",
    "react-native-reanimated": "^1.13.2",
    "react-native-render-html": "^5.0.1",
    "react-native-safe-area-context": "^3.1.9",
    "react-native-screens": "^2.17.1",
    "react-native-unimodules": "^0.12.0",
    "react-native-vector-icons": "^8.0.0",
    "react-native-webview": "^11.2.1",
    "recyclerlistview": "^3.0.5",
    "rn-update-apk": "^4.5.1",
    "update": "^0.7.4"
  },

Im unable tp upgrade react, to a higher version due to dependency other packages have with it, So what should i do?

deprecated PackageManager.getPackageInfo(String, int) causing crashes in android 13 devices.

ERROR:

Attempt to read from field 'java.lang.String android.content.pm.PackageInfo.versionName' on a null object reference in method 'void net.mikehardy.rnupdateapk.RNUpdateAPK.getApkInfo(java.lang.String, com.facebook.react.bridge.Promise)'

Stacktrace

RNUpdateAPK.java:113 net.mikehardy.rnupdateapk.RNUpdateAPK.getApkInfo
Method.java:-2 java.lang.reflect.Method.invoke
JavaMethodWrapper.java:372 com.facebook.react.bridge.JavaMethodWrapper.invoke
JavaModuleWrapper.java:188 com.facebook.react.bridge.JavaModuleWrapper.invoke
NativeRunnable.java:-2 com.facebook.react.bridge.queue.NativeRunnable.run
Handler.java:942 android.os.Handler.handleCallback
Handler.java:99 android.os.Handler.dispatchMessage
MessageQueueThreadHandler.java:27 com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage
Looper.java:240 android.os.Looper.loopOnce
Looper.java:351 android.os.Looper.loop
MessageQueueThreadImpl.java:226 com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run
Thread.java:1012 java.lang.Thread.run
node_modules/react-native/Libraries/BatchedBridge/NativeModules.js:106:59 promiseMethodWrapper
node_modules/rn-update-apk/index.js:127:30 anonymous
/tmp/hermes/staging/hermes/cmake/intlRelease/arm64-v8a/lib/InternalBytecode/InternalBytecode.js:53:16 tryCallOne
/tmp/hermes/staging/hermes/cmake/intlRelease/arm64-v8a/lib/InternalBytecode/InternalBytecode.js:139:27 anonymous
(native) apply
node_modules/react-native/Libraries/Core/Timers/JSTimers.js:248:22 anonymous
node_modules/react-native/Libraries/Core/Timers/JSTimers.js:112:14 _callTimer
node_modules/react-native/Libraries/Core/Timers/JSTimers.js:166:14 _callReactNativeMicrotasksPass
node_modules/react-native/Libraries/Core/Timers/JSTimers.js:418:41 callReactNativeMicrotasks
node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:393:41 __callReactNativeMicrotasks
node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:135:38 anonymous
node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:370:10 __guard
node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:134:16 flushedQueue
node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:130:28 invokeCallbackAndReturnFlushedQueue

Devices

Coming to 200 of our users mostly on android 13
Screenshot 2023-04-05 at 4 01 38 PM
Screenshot 2023-04-05 at 4 03 24 PM

Links

https://stackoverflow.com/questions/73388061/android-13-sdk-33-packagemanager-getpackageinfostring-int-deprecated-what
Baseflow/flutter-permission-handler#851 (comment)

Ability to prevent tapping outside the update modal

Hi

I recently started using your lib. Thank you, it's really cool and helps us to deliver new versions to our customers much faster ๐Ÿ‘

I only have one question on how I can block user interface from tapping outside the installation modal and crashing the app ๐Ÿ˜…
This is how it can be reproduced:

  1. Launch the example app.
  2. Click "Update" in the modal.
  3. Click "Install" in the next modal.
  4. When the installation modal is shown, tap outside of it.
  5. The installation process becomes interrupted, and the app crashes.
Prevent.tap.outside.and.app.crash.-.720p.mov

I tried to investigate the source code of your lib - ACTION_INSTALL_PACKAGE intent is called for updating the application. I googled if there are any special flags like "setCancellable(false)" that we could pass to this intent, but didn't find any.

Then I tried to make a fix at the "react-native" side and added a View with absolute position and pointerEvents="none" prop on the whole screen. But unfortunately this didn't work: if I tap on that View, the installation modal closes immediately.

How do you think, are there any ways to prevent installation modal from being closed and the app - crashed? Or is it a standard Android behavior which we cannot change?

The signature thumbprints seem unequal. Install will fail

First of all thank you for your great work .
I'am trying to integrate your Lib , to an existing App, already tried the Example app (work as expected).

i uploaded the apk and the json file to google drive

but iam facing this problem
this is my console.log

NUpdateAPK::downloadApk - downloadApkEnd downloadApkEnd callback called RNUpdateAPK::downloadApk - Old Cert SHA-256:fac61745dc0903786fb9ede62a962b399f7348f0bb6f899b8332667591033b9c RNUpdateAPK::downloadApk - New Cert SHA-256: 933960e3e54194b26fff97fa52ddbee75037adb1c4ac1767126d4c53cadf3ebc The signature thumbprints seem unequal. Install will fail

How to get the sha1?

Hi,

Could someone help how to get the sha1?

I am right now using UpdateAPK.getInstalledSigningInfo()

But getting sha256.

Cannot read property 'RNFSFileTypeRegular' of null

Hey, i'm using rn-update-apk with rn-fetch-blob, the app detects updates and force updates but it cannot start downloading, i get this error which i believe is related to react-native-fs:
TypeError: Cannot read property 'RNFSFileTypeRegular' of null, js engine: hermes
image

how can i fix this problem?
thank you.

Failed to fin configured root that contains

I'm trying to implement this library in a test app for later use in my real app. The download happens normally, but when you finish downloading the apk of the new version, this error mentioned in the title appears, does anyone have any suggestions on what might be happening?

Bypassing authorization

Hi @mikehardy (you're everywhere ! RN Firebase, here, ;))

Thank you for this awesome library that is doing well.
I'm currently working on improving the doc a bit and adding typescript support.

I'm using this library for a kiosk station far away from the company headquarters and while I'm using Expo with code push updates, I would like someday to be able to update the native code.
Everything works well, despite I would like to bypass the modal asking for installing the APK ("Would you kike to update this application? Your data won't be lost).
As the tablet is black-boxed, there is no interaction on it from the user, you need to use a screwdriver and wire USB peripherals to gain access to the interface, which is something I would like to avoid.

I have no access to the Play Store, do you have any idea how to proceed?

Thanks

Couldn't find meta-data for provider with authority ...

I have a error: Couldn't find meta-data for provider with authority com.lavrik_comics
What am I doing:

const RNUpdateAPK = NativeModules.RNUpdateAPK;

...
// my logic of checking the version and downloading the apk file
...

RNUpdateAPK.installApk(pathApk, RNUpdateAPK.packageName); // Couldn't find meta-data for provider with authority com.lavrik_comics

packageName is exactly what is specified in the manifest

What could be wrong? where to look?

fileprovider

hello, i wonder where file provider do you place? i don't see it anywhere. so how does it works when you ues FileProvider? thanks

Implement ability to compare minSdkVersion and download appropriate APK

The system should be able to detect the current device API, the version JSON on the server may contain minSDK information for specific APKs, and the downloader should not fetch an APK with a minSdkVersion that is greater than the device API

This can help the system handle version skew over time

No package identifier when getting name for resource number

Hi,

When I try download and install apk for the first time, I get log "No package identifier when getting name for resource number 0x00000000" on Android terminal. After retrying everything is ok.

Any idea?

13:34:43.5440[debug][Downloader]:EMIT: 62.0, TOTAL:1555961613:34:43.5920[debug][Downloader]:EMIT: 63.0, TOTAL:1581836813:34:43.6410[debug][Downloader]:EMIT: 64.0, TOTAL:1606892813:34:43.6900[debug][Downloader]:EMIT: 65.0, TOTAL:1631948813:34:43.7360[debug][Downloader]:EMIT: 66.0, TOTAL:1657004813:34:43.7830[debug][Downloader]:EMIT: 67.0, TOTAL:1682912013:34:43.8330[debug][Downloader]:EMIT: 68.0, TOTAL:1707968013:34:43.8790[debug][Downloader]:EMIT: 69.0, TOTAL:1733024013:34:43.9200[debug][Downloader]:EMIT: 70.0, TOTAL:1758899213:34:43.9660[debug][Downloader]:EMIT: 71.0, TOTAL:1783955213:34:44.0150[debug][Downloader]:EMIT: 72.0, TOTAL:1809011213:34:44.0660[debug][Downloader]:EMIT: 73.0, TOTAL:1834067213:34:44.1110[debug][Downloader]:EMIT: 74.0, TOTAL:1859974413:34:44.1680[debug][Downloader]:EMIT: 75.0, TOTAL:1885030413:34:44.2130[debug][Downloader]:EMIT: 76.0, TOTAL:1910086413:34:44.2790[debug][Downloader]:EMIT: 77.0, TOTAL:1935961613:34:44.3180[debug][Downloader]:EMIT: 78.0, TOTAL:1961017613:34:44.3710[debug][Downloader]:EMIT: 79.0, TOTAL:1986073613:34:44.4070[debug][Downloader]:EMIT: 80.0, TOTAL:2011129613:34:44.4620[debug][Downloader]:EMIT: 81.0, TOTAL:2037036813:34:44.5050[debug][Downloader]:EMIT: 82.0, TOTAL:2062092813:34:44.5660[debug][Downloader]:EMIT: 83.0, TOTAL:2087148813:34:44.5990[debug][Downloader]:EMIT: 84.0, TOTAL:2113024013:34:44.6440[debug][Downloader]:EMIT: 85.0, TOTAL:2138080013:34:44.6960[debug][Downloader]:EMIT: 86.0, TOTAL:2163136013:34:44.7460[debug][Downloader]:EMIT: 87.0, TOTAL:2188192013:34:44.7950[debug][Downloader]:EMIT: 88.0, TOTAL:2214099213:34:44.8480[debug][Downloader]:EMIT: 89.0, TOTAL:2239155213:34:44.8870[debug][Downloader]:EMIT: 90.0, TOTAL:2264211213:34:44.9350[debug][Downloader]:EMIT: 91.0, TOTAL:2290086413:34:44.9970[debug][Downloader]:EMIT: 92.0, TOTAL:2315142413:34:45.0470[debug][Downloader]:EMIT: 93.0, TOTAL:2340198413:34:45.0860[debug][Downloader]:EMIT: 94.0, TOTAL:2365254413:34:45.1340[debug][Downloader]:EMIT: 95.0, TOTAL:2391161613:34:45.3850[debug][Downloader]:EMIT: 96.0, TOTAL:2416217613:34:45.6520[debug][Downloader]:EMIT: 97.0, TOTAL:2441273613:34:45.6990[debug][Downloader]:EMIT: 98.0, TOTAL:2467148813:34:45.7460[debug][Downloader]:EMIT: 99.0, TOTAL:2492204813:34:45.7830[debug][Downloader]:EMIT: 100.0, TOTAL:2517260813:34:45.8100[debug][Downloader]:EMIT: 100.0, TOTAL:2529664213:34:45.8880[warn][ResourceType]:No package identifier when getting name for resource number 0x00000000

Couldn't find meta-data for provider with authority

ๅฎ‰่ฃ…ๆ—ถ้—ช้€€

10-13 12:18:33.635 16561 16617 E AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
10-13 12:18:33.635 16561 16617 E AndroidRuntime: Process: com.BleWatch, PID: 16561
10-13 12:18:33.635 16561 16617 E AndroidRuntime: java.lang.IllegalArgumentException: Couldn't find meta-data for provider with authority com.BleWatch
10-13 12:18:33.635 16561 16617 E AndroidRuntime: at androidx.core.content.FileProvider.parsePathStrategy(FileProvider.java:662)
10-13 12:18:33.635 16561 16617 E AndroidRuntime: at androidx.core.content.FileProvider.getPathStrategy(FileProvider.java:635)
10-13 12:18:33.635 16561 16617 E AndroidRuntime: at androidx.core.content.FileProvider.getUriForFile(FileProvider.java:441)
10-13 12:18:33.635 16561 16617 E AndroidRuntime: at net.mikehardy.rnupdateapk.RNUpdateAPK.installApk(RNUpdateAPK.java:138)
10-13 12:18:33.635 16561 16617 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
10-13 12:18:33.635 16561 16617 E AndroidRuntime: at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
10-13 12:18:33.635 16561 16617 E AndroidRuntime: at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:158)
10-13 12:18:33.635 16561 16617 E AndroidRuntime: at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
10-13 12:18:33.635 16561 16617 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:955)
10-13 12:18:33.635 16561 16617 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
10-13 12:18:33.635 16561 16617 E AndroidRuntime: at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
10-13 12:18:33.635 16561 16617 E AndroidRuntime: at android.os.Looper.loopOnce(Looper.java:206)
10-13 12:18:33.635 16561 16617 E AndroidRuntime: at android.os.Looper.loop(Looper.java:296)
10-13 12:18:33.635 16561 16617 E AndroidRuntime: at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:232)
10-13 12:18:33.635 16561 16617 E AndroidRuntime: at java.lang.Thread.run(Thread.java:930)

i check the intermediates
android/app/build/intermediates/merged_manifests/release/AndroidManifest.xml
then i found

   <provider
        android:name="androidx.core.content.FileProvider"
        android:authorities="com.BleWatch.provider"
        android:exported="false"
        android:grantUriPermissions="true" >
        <meta-data
            android:name="android.support.FILE_PROVIDER_PATHS"
            android:resource="@xml/provider_paths" />
    </provider>

"com.BleWatch.provider" should be "com.BleWatch.fileprovider"

i don't know how to fix it .

Examine in-app-updates from official play store for inspiration

https://developer.android.com/guide/app-bundle/in-app-updates

Some good ideas here - mostly the UI is what I have looked at now and the example app doesn't really provide any UI cues but maybe we could change that

The troubleshooting section is very relevant for this package - all of those items should be called out here (they tripped me up during development at least...)

Beyond that I want to look at the code they provide and see if they are doing anything special

onError() not called if download corrupt

Not sure why, and v3.2.5 was supposed to fix it, but if you attempt to fetch an empty file (for instance) the download will "succeed", but then fetching APK info in the native module fails. That error is successfully logged (so you can see it in dev with react-native log-android) but the onError handler should be called as well so that you can react to it in code. Right now it just appears to be a "successful" download but nothing happens in the end.

replace react-native-fs with rn-fetch-blob

Can I somehow replace react-native-fs with an rn-fetch-blob that is already connected in my application?

Maybe you can somehow redefine the upload function to write it yourself via rn-fetch-blob?

I didn't find this in the documentation

Deprecation - iOS - "openURL" is deprecated

XCode 10.2 is showing me the error:

'openURL:' is deprecated: first deprecated in iOS 10.0 - Please use openURL:options:completionHandler: instead

Line 46 of ios/RNUpdateAPK.m

This is problem in RN0.60.5, when I run-android

WX20190905-111830

ERROR: Unable to resolve dependency for ':rn-update-apk@debug/compileClasspath': Could not resolve com.android.support:appcompat-v7:28.0.0.
Show Details
Affected Modules: rn-update-apk
ERROR: Unable to resolve dependency for ':rn-update-apk@debug/compileClasspath': Could not resolve androidx.appcompat:appcompat:{strictly 1.0.0}.
Show Details
Affected Modules: rn-update-apk
ERROR: Unable to resolve dependency for ':rn-update-apk@debug/compileClasspath': Could not resolve androidx.core:core:{strictly 1.0.0}.
Show Details
Affected Modules: rn-update-apk
ERROR: Unable to resolve dependency for ':rn-update-apk@debug/compileClasspath': Could not resolve androidx.vectordrawable:vectordrawable:{strictly 1.0.0}.
Show Details
Affected Modules: rn-update-apk
ERROR: Unable to resolve dependency for ':rn-update-apk@debug/compileClasspath': Could not resolve androidx.appcompat:appcompat:1.0.2.
Show Details
Affected Modules: rn-update-apk
ERROR: Unable to resolve dependency for ':rn-update-apk@debug/compileClasspath': Could not resolve androidx.core:core:1.0.1.
Show Details
Affected Modules: rn-update-apk
ERROR: Unable to resolve dependency for ':rn-update-apk@debug/compileClasspath': Could not resolve androidx.vectordrawable:vectordrawable:1.0.1.
Show Details
Affected Modules: rn-update-apk
ERROR: Unable to resolve dependency for ':rn-update-apk@debug/compileClasspath': Could not resolve androidx.core:core:1.0.0.
Show Details
Affected Modules: rn-update-apk
ERROR: Unable to resolve dependency for ':rn-update-apk@debug/compileClasspath': Could not resolve androidx.vectordrawable:vectordrawable:1.0.0.
Show Details
Affected Modules: rn-update-apk

I guess RN0.60+ uses androidx package, not android

Mixed appcompact version requirements?

Not sure if this is just on my side but:

I've installed the npm package in my own react-native app. I've manually linked it so that RNUpdateAPK native module is made available to the javascript side.

But when trying to build the app I get this error from the Android builder:

Could not find androidx.appcompat:appcompat:25.0.0.
Required by:
    project :rn-update-apk
Search in build.gradle files

It asks for a version of androidx.appcompat that does not exist. Newest available is 1.3.1, 25.0.0 should be a version of the old com.android package.

I can see that the package would fallback to a proper 1.3.0 version of androidx but I don't understand much else. https://github.com/mikehardy/react-native-update-apk/blob/master/android/build.gradle#L48

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.