Expo Run command - location of compiler output for Android

Hi,

I’ve been developing an app using the managed workflow - I am a newbie and have no experience building iOS or android apps. I am getting a compilation error whilst using Eas Build for the Android app, so I decided to try compiling it locally using “expo run”.

This is what I get in the log:

> Task :react-native-track-player:compileReleaseJavaWithJavac FAILED
/Users/steve/Library/Mobile Documents/com~apple~CloudDocs/Software Development/DevProjects/EruptionRadio RNTP v2.1.4/node_modules/react-native-track-player/android/src/main/java/com/guichaguri/trackplayer/service/metadata/MetadataManager.java:84: error: cannot find symbol
        if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.S) {
                                                                              ^
  symbol:   variable S
  location: class android.os.Build.VERSION_CODES
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
w: Detected multiple Kotlin daemon sessions at build/kotlin/sessions

FAILURE: Build failed with an exception.

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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.9/userguide/command_line_interface.html#sec:command_line_warnings

Where is the compiler output located? I can’t seem to find it anywhere.

Thanks

Hi - can anyone help with this please? Really struggling to find the compiler output. Many thanks

Hi @steveuplift

Not sure if you’re referring to the logs? If so, you were looking at them :slight_smile:

Weird errors like that sometimes happen if you have compatibility problems between your dependencies.

Please post your dependencies and devDependencies sections from package.json. Also, in case one of the Expo team members sees this thread, please post a link to the failed build. I won’t be able to see the logs, but Expo team members will be able to.

Hi @wodin , thanks for the reply, and sorry for my delayed response!

Here are the dependencies and devDependencies

"dependencies": {
    "@babel/preset-typescript": "^7.18.6",
    "@expo/vector-icons": "^12.0.0",
    "@react-native-async-storage/async-storage": "~1.15.0",
    "@react-native-community/masked-view": "0.1.10",
    "@react-native-community/slider": "4.1.12",
    "axios": "^0.26.0",
    "date-fns": "^2.28.0",
    "expo": "^44.0.6",
    "expo-app-loading": "~1.3.0",
    "expo-asset": "~8.4.6",
    "expo-blur": "~11.0.0",
    "expo-build-properties": "^0.3.0",
    "expo-dev-client": "~0.8.6",
    "expo-font": "~10.0.4",
    "expo-linear-gradient": "~11.0.3",
    "expo-linking": "~3.0.0",
    "expo-updates": "~0.11.7",
    "prop-types": "^15.7.2",
    "react": "17.0.1",
    "react-dom": "17.0.1",
    "react-native": "0.64.3",
    "react-native-gesture-handler": "~2.1.0",
    "react-native-reanimated": "~2.3.1",
    "react-native-safe-area-context": "3.3.2",
    "react-native-screens": "~3.10.1",
    "react-native-svg": "12.1.1",
    "react-native-track-player": "^2.1.4",
    "react-native-web": "0.17.1",
    "react-navigation": "^4.4.4",
    "react-navigation-stack": "^2.10.4",
    "react-navigation-tabs": "^2.11.1",
    "expo-splash-screen": "~0.14.1",
    "expo-status-bar": "~1.2.0"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "babel-eslint": "^10.1.0",
    "babel-preset-expo": "9.0.2",
    "eslint": "7.32.0",
    "eslint-config-airbnb": "^18.2.1",
    "eslint-config-prettier": "^8.3.0",
    "eslint-plugin-import": "^2.25.2",
    "eslint-plugin-import-helpers": "^1.1.0",
    "eslint-plugin-jsx-a11y": "^6.4.1",
    "eslint-plugin-prettier": "^4.0.0",
    "eslint-plugin-react": "^7.26.1",
    "eslint-plugin-react-hooks": "^4.2.0",
    "eslint-plugin-react-native": "^3.11.0",
    "prettier": "^2.4.1",
    "react-native-clean-project": "^4.0.1"
  },

I was referring to the gradle/java compiler output (not sure which one it is).

Here is the link to the failed build:

Thanks in advance!

Steve

Thanks.

Off the top of my head:

I see you’re on Expo SDK 44. You should upgrade :slight_smile:

This is deprecated. There’s now a @react-native-masked-view/masked-view. I’m not sure off hand which one would work best with Expo SDK 44.

This no longer exists in the latest Expo SDK versions. See AppLoading - Expo Documentation. There’s also mention of this in one of the recent Expo SDK release announcements (either 46 or 47).

I’m pretty sure this only works from Expo SDK 45 onwards.

Not sure you should have this these days.

Thanks. I also noticed that I have these warnings when adding or removing a package:

warning " > @react-native-community/masked-view@0.1.10" has incorrect peer dependency "react@^16.0".
warning "react-native > react-native-codegen > jscodeshift@0.11.0" has unmet peer dependency "@babel/preset-env@^7.1.6".
warning " > react-navigation-tabs@2.11.2" has incorrect peer dependency "react-native-gesture-handler@^1.0.0".
warning " > react-navigation-tabs@2.11.2" has incorrect peer dependency "react-native-reanimated@^1.0.0-alpha".

As they were only warnings I didn’t think they would affect the build, but I guess these could also be the issue?

Thanks

Steve

Yes, possibly. You might want to look into upgrading to React Navigation 5 or 6 in addition to upgrading to Expo SDK 45 (at least).

Upgrading React Navigation 4 to 5 will need a bit of work.

Hi - I did the painstaking upgrading of React Nav to v6. Still didn’t work, however it was a task I needed to do anyway so that’s all good.

Upgrading to Expo SDK 45 has worked for me however so I now have an Android build.

Many thanks for your help

1 Like