Skip to content

Next

  • Projects
  • Groups
  • Snippets
  • Help
  • Sign in / Register
Minds Mobile
Minds Mobile
  • Project overview
  • Repository
  • Issues 240
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 12
  • Security & Compliance
  • Packages
  • Wiki
  • Snippets
  • Members
  • Collapse sidebar
  • Graph
  • Charts
  • Create a new issue
  • Commits
  • Issue Boards
  • Minds
  • Minds MobileMinds Mobile
  • Issues
  • #1484

Closed
Open
Opened 6 days ago by Jim Toth@jim-toth:milky_way:
Report abuse New issue

Can't run dev env on android - package androidx.core.net does not exist

Summary

After successfully running yarn install I ran into an error related to the reactnativecommunity/netinfo package.

Steps to reproduce

  1. yarn install
  2. react-native run-android

Platform information

(Device, Android/iOS version, system stats, screen size) Windows 10, Node 10.16.3, physical android device

App version

latest master branch

What is the current bug behavior?

Build fails and doesn't load onto android device / emulator

What is the expected correct behavior?

Builds correctly and loads onto android device / emulator

Relevant logs and/or screenshots

> Task :@react-native-community_netinfo:compileDebugJavaWithJavac FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.4.1/userguide/command_line_interface.html#sec:command_line_warnings
19 actionable tasks: 6 executed, 13 up-to-date
C:\Users\letif\dev\mobile-native\node_modules\@react-native-community\netinfo\android\src\main\java\com\reactnativecommunity\netinfo\ConnectivityReceiver.java:12: error: package androidx.core.net does not exist
import androidx.core.net.ConnectivityManagerCompat;
                        ^
C:\Users\letif\dev\mobile-native\node_modules\@react-native-community\netinfo\android\src\main\java\com\reactnativecommunity\netinfo\ConnectivityReceiver.java:154: error: cannot find symbol
                    ConnectivityManagerCompat.isActiveNetworkMetered(getConnectivityManager());
                    ^
  symbol:   variable ConnectivityManagerCompat
  location: class ConnectivityReceiver
2 errors

FAILURE: Build failed with an exception.

  location: class ConnectivityReceiver
2 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':@react-native-community_netinfo: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.

* Get more help at https://help.gradle.org

BUILD FAILED in 5s

    at checkExecSyncError (child_process.js:629:11)
    at execFileSync (child_process.js:647:13)
    at runOnAllDevices (C:\Users\letif\AppData\Roaming\nvm\v10.16.3\node_modules\react-native\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:39)
    at buildAndRun (C:\Users\letif\AppData\Roaming\nvm\v10.16.3\node_modules\react-native\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:158:41)
    at then.result (C:\Users\letif\AppData\Roaming\nvm\v10.16.3\node_modules\react-native\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:125:12)
    at process._tickCallback (internal/process/next_tick.js:68:7)

Possible fixes

Unsure of possible fixes, posting here for help. It seems to be an issue with upgrading to AndroidX within the reactnativecommunity/netinfo library. I've played around with jetifier (both directions) and neither seem to work. jetify -r results in complaining about @NonNull annotation missing. Any insight into the minds team environments would be helpful as this is a fresh install of all dependencies.

Related issues
0

  • Discussion 4
  • Designs 0
    • Ben Hayward
      Ben Hayward @benhayward.ben · 6 days ago
      Developer

      @msantang78 or @juanmsolaro may be able to assist you here

    • Collapse replies
    • Jim Toth
      Jim Toth :milky_way: @jim-toth · 3 hours ago
      Guest

      @msantang78 @juanmsolaro any insight?

    • Juan Manuel Solaro
      Juan Manuel Solaro @juanmsolaro · 3 hours ago
      Developer

      Hey Jim! What I first noticed is that we are not pointing to master branch in our dev env anymore. Try pointing AND updating to release/3.11.0 Then you can run yarn and then yarn android

    • Jim Toth
      Jim Toth :milky_way: @jim-toth · 3 hours ago
      Guest

      Thanks, I will give this a try and report back

    • Please register or sign in to reply
Please register or sign in to reply
0 Assignees
None
none
Epic
None
None
Milestone
None
Time tracking
No estimate or time spent
None
Due date
None
0
Labels
None
None
Weight
None
Confidentiality
Not confidential
Lock issue
Unlocked
4
4 participants
user avatar
Jim Toth
user avatar
Juan Manuel Solaro
user avatar
Ben Hayward
user avatar
Martin Santangelo
Reference: minds/mobile-native#1484