Build Custom Expokit 1.7.1 for sdk30.0.0


#1

Hi, I want to know how to build expokit from repo expo/expo. because i want to modify some of the code. and make an custom expokit-npm-module.

I follow this instruction How to build a customised expokit-npm-package but it failed.

steps i follow

  1. fork repo expo/expo & git clone
  2. checkout android/sdk30
  3. yarn install on both (tools & tools-public)
  4. cd tools
  5. gulp update-exponent-view --abi 30.0.0
[11:37:26] Using gulpfile ~/Documents/myproject/expo/tools/gulpfile.js
[11:37:26] Starting 'update-exponent-view'...
Running rm -rf /Users/fariswd/.m2/repository/host/exp/exponent/expoview /Users/fariswd/.m2/repository/host/exp/exponent/expo-ads-admob /Users/fariswd/.m2/repository/host/exp/exponent/expo-barcode-scanner /Users/fariswd/.m2/repository/host/exp/exponent/expo-barcode-scanner-interface /Users/fariswd/.m2/repository/host/exp/exponent/expo-camera /Users/fariswd/.m2/repository/host/exp/exponent/expo-camera-interface /Users/fariswd/.m2/repository/host/exp/exponent/expo-constants /Users/fariswd/.m2/repository/host/exp/exponent/expo-constants-interface /Users/fariswd/.m2/repository/host/exp/exponent/expo-contacts /Users/fariswd/.m2/repository/host/exp/exponent/expo-core /Users/fariswd/.m2/repository/host/exp/exponent/expo-face-detector /Users/fariswd/.m2/repository/host/exp/exponent/expo-face-detector-interface /Users/fariswd/.m2/repository/host/exp/exponent/expo-file-system /Users/fariswd/.m2/repository/host/exp/exponent/expo-file-system-interface /Users/fariswd/.m2/repository/host/exp/exponent/expo-font /Users/fariswd/.m2/repository/host/exp/exponent/expo-font-interface /Users/fariswd/.m2/repository/host/exp/exponent/expo-gl /Users/fariswd/.m2/repository/host/exp/exponent/expo-gl-cpp /Users/fariswd/.m2/repository/host/exp/exponent/expo-image-loader-interface /Users/fariswd/.m2/repository/host/exp/exponent/expo-local-authentication /Users/fariswd/.m2/repository/host/exp/exponent/expo-localization /Users/fariswd/.m2/repository/host/exp/exponent/expo-location /Users/fariswd/.m2/repository/host/exp/exponent/expo-media-library /Users/fariswd/.m2/repository/host/exp/exponent/expo-payments-stripe /Users/fariswd/.m2/repository/host/exp/exponent/expo-permissions /Users/fariswd/.m2/repository/host/exp/exponent/expo-permissions-interface /Users/fariswd/.m2/repository/host/exp/exponent/expo-print /Users/fariswd/.m2/repository/host/exp/exponent/expo-react-native-adapter /Users/fariswd/.m2/repository/host/exp/exponent/expo-analytics-segment /Users/fariswd/.m2/repository/host/exp/exponent/expo-sensors /Users/fariswd/.m2/repository/host/exp/exponent/expo-sensors-interface /Users/fariswd/.m2/repository/host/exp/exponent/expo-sms
Running rm -rf /Users/fariswd/.m2/repository/com/facebook/react
Running ./gradlew :ReactAndroid:uploadArchives
[11:37:27] 'update-exponent-view' errored after 1.39 s
[11:37:27] Error: Process exited with non-zero code: 1
    at ChildProcess.child.on (/Users/fariswd/Documents/myproject/expo/tools/node_modules/@exponent/spawn-async/build/spawnAsync.js:39:21)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Socket.stream.socket.on (internal/child_process.js:346:11)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at Pipe._handle.close [as _onclose] (net.js:567:12)

Thanks


#2

oh my, i forgot to add ndk.dir on local.properties.

and i run this again gulp update-exponent-view --abi 30.0.0 another error comes up

[13:50:35] Using gulpfile ~/Documents/myproject/expo/tools/gulpfile.js
[13:50:35] Starting 'update-exponent-view'...
Running rm -rf /Users/fariswd/.m2/repository/host/exp/exponent/expoview /Users/fariswd/.m2/repository/host/exp/exponent/expo-ads-admob /Users/fariswd/.m2/repository/host/exp/exponent/expo-barcode-scanner /Users/fariswd/.m2/repository/host/exp/exponent/expo-barcode-scanner-interface /Users/fariswd/.m2/repository/host/exp/exponent/expo-camera /Users/fariswd/.m2/repository/host/exp/exponent/expo-camera-interface /Users/fariswd/.m2/repository/host/exp/exponent/expo-constants /Users/fariswd/.m2/repository/host/exp/exponent/expo-constants-interface /Users/fariswd/.m2/repository/host/exp/exponent/expo-contacts /Users/fariswd/.m2/repository/host/exp/exponent/expo-core /Users/fariswd/.m2/repository/host/exp/exponent/expo-face-detector /Users/fariswd/.m2/repository/host/exp/exponent/expo-face-detector-interface /Users/fariswd/.m2/repository/host/exp/exponent/expo-file-system /Users/fariswd/.m2/repository/host/exp/exponent/expo-file-system-interface /Users/fariswd/.m2/repository/host/exp/exponent/expo-font /Users/fariswd/.m2/repository/host/exp/exponent/expo-font-interface /Users/fariswd/.m2/repository/host/exp/exponent/expo-gl /Users/fariswd/.m2/repository/host/exp/exponent/expo-gl-cpp /Users/fariswd/.m2/repository/host/exp/exponent/expo-image-loader-interface /Users/fariswd/.m2/repository/host/exp/exponent/expo-local-authentication /Users/fariswd/.m2/repository/host/exp/exponent/expo-localization /Users/fariswd/.m2/repository/host/exp/exponent/expo-location /Users/fariswd/.m2/repository/host/exp/exponent/expo-media-library /Users/fariswd/.m2/repository/host/exp/exponent/expo-payments-stripe /Users/fariswd/.m2/repository/host/exp/exponent/expo-permissions /Users/fariswd/.m2/repository/host/exp/exponent/expo-permissions-interface /Users/fariswd/.m2/repository/host/exp/exponent/expo-print /Users/fariswd/.m2/repository/host/exp/exponent/expo-react-native-adapter /Users/fariswd/.m2/repository/host/exp/exponent/expo-analytics-segment /Users/fariswd/.m2/repository/host/exp/exponent/expo-sensors /Users/fariswd/.m2/repository/host/exp/exponent/expo-sensors-interface /Users/fariswd/.m2/repository/host/exp/exponent/expo-sms
Running rm -rf /Users/fariswd/.m2/repository/com/facebook/react
Running ./gradlew :ReactAndroid:uploadArchives
Running ./gradlew :expo-ads-admob:uploadArchives
Running ./gradlew :expo-barcode-scanner:uploadArchives
Running ./gradlew :expo-barcode-scanner-interface:uploadArchives
Running ./gradlew :expo-camera:uploadArchives
Running ./gradlew :expo-camera-interface:uploadArchives
Running ./gradlew :expo-constants:uploadArchives
Running ./gradlew :expo-constants-interface:uploadArchives
Running ./gradlew :expo-contacts:uploadArchives
Running ./gradlew :expo-core:uploadArchives
Running ./gradlew :expo-face-detector:uploadArchives
Running ./gradlew :expo-face-detector-interface:uploadArchives
Running ./gradlew :expo-file-system:uploadArchives
Running ./gradlew :expo-file-system-interface:uploadArchives
Running ./gradlew :expo-font:uploadArchives
Running ./gradlew :expo-font-interface:uploadArchives
Running ./gradlew :expo-gl:uploadArchives
Running ./gradlew :expo-gl-cpp:uploadArchives
Running ./gradlew :expo-image-loader-interface:uploadArchives
Running ./gradlew :expo-local-authentication:uploadArchives
Running ./gradlew :expo-localization:uploadArchives
Running ./gradlew :expo-location:uploadArchives
Running ./gradlew :expo-media-library:uploadArchives
Running ./gradlew :expo-payments-stripe:uploadArchives
Running ./gradlew :expo-permissions:uploadArchives
Running ./gradlew :expo-permissions-interface:uploadArchives
Running ./gradlew :expo-print:uploadArchives
Running ./gradlew :expo-react-native-adapter:uploadArchives
Running ./gradlew :expo-analytics-segment:uploadArchives
Running ./gradlew :expo-sensors:uploadArchives
Running ./gradlew :expo-sensors-interface:uploadArchives
Running ./gradlew :expo-sms:uploadArchives
Running ./gradlew :expoview:uploadArchives
[13:51:39] 'update-exponent-view' errored after 1.05 min
[13:51:39] Error: Process exited with non-zero code: 1
    at ChildProcess.child.on (/Users/fariswd/Documents/myproject/expo/tools/node_modules/@exponent/spawn-async/build/spawnAsync.js:39:21)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Socket.stream.socket.on (internal/child_process.js:346:11)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at Pipe._handle.close [as _onclose] (net.js:567:12)

i tried run ./gradlew :expoview:uploadArchives on android folder and this comes up

Parallel execution with configuration on demand is an incubating feature.

> Configure project :expoview 
WARNING: Configuration 'provided' is obsolete and has been replaced with 'compileOnly'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html

> Task :expoview:generateDynamicMacros 
~/Documents/myproject/expo/tools-public ~/Documents/myproject/expo/android/expoview
[14:01:21] Using gulpfile ~/Documents/myproject/expo/tools-public/gulpfile.js
[14:01:21] Starting 'generate-dynamic-macros'...
generate-dynamic-macros is falling back to `template-files/keys.json`
Downloading DEV published kernel manifest...
Generating local kernel manifest from project root /Users/fariswd/Documents/myproject/expo/home and url exp://192.168.1.137:80...
{ buildPhase: 'reading manifest' } { RequestError: Error: connect ECONNREFUSED 192.168.1.137:80
    at new RequestError (/Users/fariswd/Documents/myproject/expo/tools-public/node_modules/request-promise-core/lib/errors.js:14:15)
    at Request.plumbing.callback (/Users/fariswd/Documents/myproject/expo/tools-public/node_modules/request-promise-core/lib/plumbing.js:87:29)
    at Request.RP$callback [as _callback] (/Users/fariswd/Documents/myproject/expo/tools-public/node_modules/request-promise-core/lib/plumbing.js:46:31)
    at self.callback (/Users/fariswd/Documents/myproject/expo/tools-public/node_modules/request/request.js:185:22)
    at emitOne (events.js:116:13)
    at Request.emit (events.js:211:7)
    at Request.onRequestError (/Users/fariswd/Documents/myproject/expo/tools-public/node_modules/request/request.js:881:8)
    at emitOne (events.js:116:13)
    at ClientRequest.emit (events.js:211:7)
    at Socket.socketErrorListener (_http_client.js:387:9)
  name: 'RequestError',
  message: 'Error: connect ECONNREFUSED 192.168.1.137:80',
  cause: 
   { Error: connect ECONNREFUSED 192.168.1.137:80
    at Object._errnoException (util.js:1022:11)
    at _exceptionWithHostPort (util.js:1044:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1198:14)
     code: 'ECONNREFUSED',
     errno: 'ECONNREFUSED',
     syscall: 'connect',
     address: '192.168.1.137',
     port: 80 },
  error: 
   { Error: connect ECONNREFUSED 192.168.1.137:80
    at Object._errnoException (util.js:1022:11)
    at _exceptionWithHostPort (util.js:1044:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1198:14)
     code: 'ECONNREFUSED',
     errno: 'ECONNREFUSED',
     syscall: 'connect',
     address: '192.168.1.137',
     port: 80 },
  options: 
   { resolveWithFullResponse: true,
     url: 'http://192.168.1.137:80',
     headers: 
      { 'Exponent-Platform': 'android',
        Accept: 'application/expo+json,application/json' },
     callback: [Function: RP$callback],
     transform: undefined,
     simple: true,
     transform2xxOnly: false },
  response: undefined }
Unable to generate manifest from /Users/fariswd/Documents/myproject/expo/home: Failed to fetch manifest from www
{ buildPhase: 'reading manifest' } 'Using manifest:' '{"android":{"package":"host.exp.exponent"},"description":"","extra":{"amplitudeApiKey":"081e5ec53f869b440b225d5e40ec73f9"},"icon":"https://s3.amazonaws.com/exp-brand-assets/ExponentEmptyManifest_192.png","iconUrl":"https://s3.amazonaws.com/exp-brand-assets/ExponentEmptyManifest_192.png","ios":{"bundleIdentifier":"host.exp.exponent","supportsTablet":true},"locales":{},"name":"expo-home","orientation":"portrait","packagerOpts":{"config":"rn-cli.config.js"},"platforms":["ios","android"],"primaryColor":"#cccccc","privacy":"unlisted","scheme":"exp","sdkVersion":"30.0.0","slug":"exponent-home-dev-97db4207e05442ad579e8eecd8096b7e2dd3b655","updates":{"checkAutomatically":"ON_LOAD","fallbackToCacheTimeout":0},"version":"30.0.0","id":"@expo-home-dev/exponent-home-dev-97db4207e05442ad579e8eecd8096b7e2dd3b655","revisionId":"30.0.0-r.wqMjgZ98K4","publishedTime":"2018-10-08T05:58:10.163Z","commitTime":"2018-10-08T05:58:10.242Z","bundleUrl":"https://d1wp6m56sqw74a.cloudfront.net/%40expo-home-dev%2Fexponent-home-dev-97db4207e05442ad579e8eecd8096b7e2dd3b655%2F30.0.0%2F07c68687e7fb0d07b381822fe4178b0d-30.0.0-android.js","releaseChannel":"default","hostUri":"expo.io/@expo-home-dev/exponent-home-dev-97db4207e05442ad579e8eecd8096b7e2dd3b655"}'


Using published dev version of Expo Home


[14:01:22] Finished 'generate-dynamic-macros' after 1.44 s
~/Documents/myproject/expo/android/expoview

> Task :expoview:compileReleaseJavaWithJavac FAILED
warning: Attempt to recreate a file for type com.raizlabs.android.dbflow.config.ExponentKernel$Database
/Users/fariswd/Documents/myproject/expo/android/expoview/src/main/java/versioned/host/exp/exponent/ExponentDevBundleDownloadListener.java:3: error: cannot find symbol
import com.facebook.react.bridge.NativeDeltaClient;
                                ^
  symbol:   class NativeDeltaClient
  location: package com.facebook.react.bridge
/Users/fariswd/Documents/myproject/expo/android/expoview/src/main/java/versioned/host/exp/exponent/ExponentDevBundleDownloadListener.java:22: error: cannot find symbol
  public void onSuccess(@Nullable NativeDeltaClient nativeDeltaClient) {
                                  ^
  symbol:   class NativeDeltaClient
  location: class ExponentDevBundleDownloadListener
warning: Attempt to recreate a file for type com.raizlabs.android.dbflow.config.ExponentKernel$Database
warning: File for type 'com.raizlabs.android.dbflow.config.GeneratedDatabaseHolder' created in the last round will not be subject to annotation processing.
2 errors
3 warnings


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':expoview: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

BUILD FAILED in 4s
14 actionable tasks: 3 executed, 11 up-to-date

Ejected expo sdk 30 fails to start on android kitkat
#3

Hi @fariswd - it looks like the android/sdk30 branch in the expo/expo repo is not in the right place and has some newer commits than it should. I’d recommend checking out an older commit (like perhaps this one) and trying to build again from there. Unfortunately, with SDK 30 and earlier we did the releases from a private monorepo instead of the expo/expo repo so things didn’t always get synced over neatly. Sorry for the difficult experience here :disappointed:


#4

thanks @esamelson. i will try lowering the expo sdk.


closed #5

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.