I'm trying to generate release apk for my react native app. I'm using react native 0.29. I'm following the instructions in https://facebook.github.io/react-native/docs/signed-apk-android.html
Here is the output of my terminal:
→ cd android && ./gradlew assembleRelease
:app:preBuild UP-TO-DATE
:app:preReleaseBuild UP-TO-DATE
:app:checkReleaseManifest
:app:preDebugBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE
:app:prepareComAndroidSupportRecyclerviewV72301Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42321Library UP-TO-DATE
:app:prepareComFacebookFrescoDrawee0110Library UP-TO-DATE
:app:prepareComFacebookFrescoFbcore0110Library UP-TO-DATE
:app:prepareComFacebookFrescoFresco0110Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipeline0110Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipelineBase0110Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipelineOkhttp30110Library UP-TO-DATE
:app:prepareComFacebookReactReactNative0291Library UP-TO-DATE
:app:prepareOrgWebkitAndroidJscR174650Library UP-TO-DATE
:app:prepareReleaseDependencies
:app:compileReleaseAidl UP-TO-DATE
:app:compileReleaseRenderscript UP-TO-DATE
:app:generateReleaseBuildConfig UP-TO-DATE
:app:generateReleaseAssets UP-TO-DATE
:app:mergeReleaseAssets
:app:generateReleaseResValues UP-TO-DATE
:app:generateReleaseResources UP-TO-DATE
:app:mergeReleaseResources
AAPT: /home/shoumma/Workspace/ReactNativeWorkspace/notesApp/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
AAPT: /home/shoumma/Workspace/ReactNativeWorkspace/notesApp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
AAPT: /home/shoumma/Workspace/ReactNativeWorkspace/notesApp/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
AAPT: /home/shoumma/Workspace/ReactNativeWorkspace/notesApp/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
:app:bundleReleaseJsAndAssets
[11:36:55 AM] <START> Building Dependency Graph
[11:36:55 AM] <START> Crawling File System
[11:36:56 AM] <START> find dependencies
[11:36:59 AM] <END> Crawling File System (4208ms)
[11:36:59 AM] <START> Building in-memory fs for JavaScript
[11:37:00 AM] <END> Building in-memory fs for JavaScript (350ms)
[11:37:00 AM] <START> Building in-memory fs for Assets
[11:37:00 AM] <END> Building in-memory fs for Assets (251ms)
[11:37:00 AM] <START> Building Haste Map
[11:37:00 AM] <START> Building (deprecated) Asset Map
[11:37:00 AM] <END> Building (deprecated) Asset Map (123ms)
[11:37:00 AM] <END> Building Haste Map (485ms)
[11:37:00 AM] <END> Building Dependency Graph (5337ms)
[11:37:24 AM] <END> find dependencies (28446ms)
bundle: start
bundle: finish
bundle: Writing bundle output to: /home/shoumma/Workspace/ReactNativeWorkspace/notesApp/android/app/build/intermediates/assets/release/index.android.bundle
bundle: Done writing bundle output
bundle: Copying 5 asset files
bundle: Done copying assets
:app:processReleaseManifest UP-TO-DATE
:app:processReleaseResources UP-TO-DATE
:app:generateReleaseSources UP-TO-DATE
:app:processReleaseJavaRes UP-TO-DATE
:app:compileReleaseJavaWithJavac UP-TO-DATE
:app:compileReleaseNdk UP-TO-DATE
:app:compileReleaseSources UP-TO-DATE
:app:lintVitalRelease
:app:preDexRelease UP-TO-DATE
:app:dexRelease UP-TO-DATE
:app:packageRelease UP-TO-DATE
:app:assembleRelease
BUILD SUCCESSFUL
Total time: 57.742 secs
But there is no app-release.apk in android/app/build/outputs/apk/app-release.apk
I have generated the my-release-key.keystore and placed it in android/app. Then I add the global variables ~/.gradle/gradle.properties:
MYAPP_RELEASE_STORE_FILE="my-release-key.keystore" [i also tried without double-quotes]
MYAPP_RELEASE_KEY_ALIAS="my-store-alias"
MYAPP_RELEASE_STORE_PASSWORD="******" [added my password]
MYAPP_RELEASE_KEY_PASSWORD="******" [added my password]
Then I have added singingConfigs in android/app/build.gradle:
signingConfigs {
release {
storeFile file(MYAPP_RELEASE_STORE_FILE)
storePassword MYAPP_RELEASE_STORE_PASSWORD
keyAlias MYAPP_RELEASE_KEY_ALIAS
keyPassword MYAPP_RELEASE_KEY_PASSWORD
}
}
Then I run the command cd android && ./gradlew assembleRelease from my project folder. But no luck, I don't have any app-realease.apk. Is there any point am I missing?
I was such an idiot. I get so frustrated that I didn't notice, I had to add one more line to android/app/build.gradle. What I missed was to add the following line inside buildTypes:
buildTypes {
release {
...
signingConfig signingConfigs.release
}
}
Also I had to remove double-quotes from ~/.gradle/gradle.properties:
MYAPP_RELEASE_STORE_FILE=my-release-key.keystore
MYAPP_RELEASE_KEY_ALIAS=my-store-alias
MYAPP_RELEASE_STORE_PASSWORD=******
MYAPP_RELEASE_KEY_PASSWORD=******
Yes, I got my app-realease.apk in the end!!! :-D
If you have successful build after official please run the below command
npx react-native run-android --variant=release
and after success you can find apk here android/app/build/outputs/apk/release
it works for me
Related
I am able to build a "development" build using eas build --profile development --platform ios and equally eas build --profile development --platform ios --local
However, production fails using eas build --profile production --platform ios and equally eas build --profile production --platform ios --local
I am using a managed workflow (custom development client) and eas-cli/2.8.0 darwin-arm64 node-v16.15.0, expo version 46
eas.json
{
"build": {
"development": {
"developmentClient": true,
"distribution": "internal",
"ios": {
"simulator": true
},
"android": {
"buildType": "apk"
}
},
"production": {},
"dev-device": {
"developmentClient": true,
"distribution": "internal",
"android": {
"buildType": "apk"
}
},
"build": {}
},
"cli": {
"version": ">= 0.48.2"
}
}
The error message unfortunately doesn't help - the actual error seems to be omitted, as the output is blank right after This must be a bug with
[RUN_FASTLANE]
⚠️ (/Users/michael/Library/Developer/Xcode/DerivedData/<projectname>-gcqxmmzlobuldzayqgevdgwkkbet/Build/Intermediates.noindex/ArchiveIntermediates/<projectname>/BuildProductsPath/Release-iphoneos/ExpoModulesCore/ExpoModulesCore.framework/Headers/EXNativeModulesProxy.h:35:161)
33 | - (nonnull instancetype)initWithCustomModuleRegistry:(nonnull EXModuleRegistry *)moduleRegistry;
34 |
> 35 | - (void)callMethod:(NSString *)moduleName methodNameOrKey:(id)methodNameOrKey arguments:(NSArray *)arguments resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject;
| ^ block pointer is missing a nullability type specifier [-Wnullability-completeness]
36 |
37 | #end
38 |
[RUN_FASTLANE] › Linking <projectname> » <projectname>
[RUN_FASTLANE] ⚠️ ld: method '+moduleName' in category from /Users/michael/Library/Developer/Xcode/DerivedData/<projectname>-gcqxmmzlobuldzayqgevdgwkkbet/Build/Intermediates.noindex/ArchiveIntermediates/<projectname>/BuildProductsPath/Release-iphoneos/ExpoModulesCore/ExpoModulesCore.framework/ExpoModulesCore(ExpoBridgeModule-80aa35da68a4e1df6bb30c3c482a2b01.o) overrides method from class in /Users/michael/Library/Developer/Xcode/DerivedData/<projectname>-gcqxmmzlobuldzayqgevdgwkkbet/Build/Intermediates.noindex/ArchiveIntermediates/<projectname>/BuildProductsPath/Release-iphoneos/ExpoModulesCore/ExpoModulesCore.framework/ExpoModulesCore(ExpoBridgeModule-5220cf34e840cf7b0d23a3f2cb8765f5.o)
[RUN_FASTLANE] ⚠️ ld: method '+UIStatusBarAnimation:' in category from /Users/michael/Library/Developer/Xcode/DerivedData/<projectname>-gcqxmmzlobuldzayqgevdgwkkbet/Build/Intermediates.noindex/ArchiveIntermediates/<projectname>/BuildProductsPath/Release-iphoneos/RNScreens/RNScreens.framework/RNScreens(RNSScreen.o) conflicts with same method from another category
[RUN_FASTLANE] › Generating debug <projectname> » <projectname>.app.dSYM
[RUN_FASTLANE] › Executing <projectname> » Bundle React Native code and images
[RUN_FASTLANE] the transform cache was reset.
[RUN_FASTLANE]
❌ error: File /Users/michael/Library/Developer/Xcode/DerivedData/<projectname>-gcqxmmzlobuldzayqgevdgwkkbet/Build/Intermediates.noindex/ArchiveIntermediates/<projectname>/BuildProductsPath/Release-iphoneos/<projectname>.app/main.jsbundle does not exist. This must be a bug with
[RUN_FASTLANE] Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'fmt' from project 'Pods')
[RUN_FASTLANE] Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'abseil' from project 'Pods')
[RUN_FASTLANE] Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Libuv-gRPC' from project 'Pods')
[RUN_FASTLANE] Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'BoringSSL-GRPC' from project 'Pods')
[RUN_FASTLANE] Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'RCT-Folly' from project 'Pods')
[RUN_FASTLANE] Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'React-bridging' from project 'Pods')
[RUN_FASTLANE] Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'gRPC-Core' from project 'Pods')
[RUN_FASTLANE] Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'React-Codegen' from project 'Pods')
[RUN_FASTLANE] Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'gRPC-C++' from project 'Pods')
[RUN_FASTLANE] Run script build phase '[CP-User] Generate app.config for prebuilt Constants.manifest' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'EXConstants' from project 'Pods')
[RUN_FASTLANE] ▸ ** ARCHIVE FAILED **
[RUN_FASTLANE] ▸ The following build commands failed:
[RUN_FASTLANE] ▸ PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images /Users/michael/Library/Developer/Xcode/DerivedData/<projectname>-gcqxmmzlobuldzayqgevdgwkkbet/Build/Intermediates.noindex/ArchiveIntermediates/<projectname>/IntermediateBuildFilesPath/<projectname>.build/Release-iphoneos/<projectname>.build/Script-00DD1BFF1BD5951E006B06BC.sh (in target '<projectname>' from project '<projectname>')
[RUN_FASTLANE] ▸ (1 failure)
[RUN_FASTLANE] ** ARCHIVE FAILED **
[RUN_FASTLANE]
[RUN_FASTLANE]
[RUN_FASTLANE] The following build commands failed:
[RUN_FASTLANE] PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images /Users/michael/Library/Developer/Xcode/DerivedData/<projectname>-gcqxmmzlobuldzayqgevdgwkkbet/Build/Intermediates.noindex/ArchiveIntermediates/<projectname>/IntermediateBuildFilesPath/<projectname>.build/Release-iphoneos/<projectname>.build/Script-00DD1BFF1BD5951E006B06BC.sh (in target '<projectname>' from project '<projectname>')
[RUN_FASTLANE] (1 failure)
[RUN_FASTLANE] Exit status: 65
[RUN_FASTLANE]
[RUN_FASTLANE] +-------------+-------------------------+
[RUN_FASTLANE] | Build environment |
[RUN_FASTLANE] +-------------+-------------------------+
[RUN_FASTLANE] | xcode_path | /Applications/Xcode.app |
[RUN_FASTLANE] | gym_version | 2.211.0 |
[RUN_FASTLANE] | sdk | iPhoneOS16.1.sdk |
[RUN_FASTLANE] +-------------+-------------------------+
[RUN_FASTLANE]
[RUN_FASTLANE] Looks like fastlane ran into a build/archive error with your project
[RUN_FASTLANE] It's hard to tell what's causing the error, so we wrote some guides on how
[RUN_FASTLANE] to troubleshoot build and signing issues: https://docs.fastlane.tools/codesigning/getting-started/
[RUN_FASTLANE] Before submitting an issue on GitHub, please follow the guide above and make
[RUN_FASTLANE] sure your project is set up correctly.
[RUN_FASTLANE] fastlane uses `xcodebuild` commands to generate your binary, you can see the
[RUN_FASTLANE] the full commands printed out in yellow in the above log.
[RUN_FASTLANE] Make sure to inspect the output above, as usually you'll find more error information there
[RUN_FASTLANE]
[RUN_FASTLANE] [!] Error building the application - see the log above
[RUN_FASTLANE] Error: Fastlane build failed with unknown error. See logs for the "Run fastlane" and "Xcode Logs" phases for more information.
Fastlane errors in most cases are not printed at the end of the output, so you may not find any useful information in the last lines of output when looking for an error message.
[CLEAN_UP_CREDENTIALS] Destroying keychain - /var/folders/lz/vn3ps0t51nv5q2g7q4kppt1r0000gn/T/turtle-v2-8afb540c-5bfc-4d59-886b-a08cb4540d11.keychain
[CLEAN_UP_CREDENTIALS] Removing provisioning profile
Build failed
Fastlane build failed with unknown error. See logs for the "Run fastlane" and "Xcode Logs" phases for more information.
Fastlane errors in most cases are not printed at the end of the output, so you may not find any useful information in the last lines of output when looking for an error message.
Error: npx exited with non-zero code: 1
❯ eas build --profile production --platform ios --local
Turns out, for the build to consider the latest code changes, they need to be committed. Local changes are not sufficient
Buried in some XCode logs an import was missing; the actual error wasn't showing in the logs outputted on the CLI (in my case it was a faulty import, which was fixed, but not committed to git)
So I have one job that produces artifacts, and another job with dependency on those artifacts from first job. I tried to use SSH Upload, however I inserted into field "Paths to sources" *.deb => /tmp
In order to download Debian packages from previous job to tmp, but it does not download anything
Logs from my job to deploy:
[21:54:49] Collecting changes in 1 VCS root
[21:54:54] The build is removed from the queue to be prepared for the start
[21:54:54] Starting the build on the agent "agent3"
[21:54:55] Updating tools for build
[21:54:55] Clearing temporary directory: /opt/buildagent/temp/buildTmp
[21:54:55] Publishing internal artifacts
[21:54:55] Full checkout enforced. Reason: [Checkout directory is empty or doesn't exist]
[21:54:55] Will perform clean checkout. Reason: Checkout directory is empty or doesn't exist
[21:54:55] Checkout directory: /opt/buildagent/work/245575fe8c01221b
[21:54:55] Resolving artifact dependencies
[21:54:55] [Resolving artifact dependencies] Destination directory [/tmp] cleaned
[21:54:55] [Resolving artifact dependencies] Downloading files from <Xenoss.test / Build job of deb/rpm packages, build #0.0.2 [id 15836]> for pattern [*.deb => /tmp
*.rpm => /tmp]
[21:54:55] [Resolving artifact dependencies] 2 files retrieved
[21:54:55] Step 1/1: Upload deb/rpm package to destination server (SSH Upload) (1s)
[21:54:55] [Step 1/1] Permanently added '139.59.178.103' (EDDSA) to the list of known hosts.
[21:54:56] [Step 1/1] Starting upload via SCP to host [139.59.178.103:22]
[21:54:56] [Step 1/1] Uploaded [0] files for [] pattern
[21:54:56] Publishing internal artifacts
[21:54:56] [Publishing internal artifacts] Publishing 1 file using [WebPublisher]
[21:54:56] [Publishing internal artifacts] Publishing 1 file using [ArtifactsCachePublisherImpl]
[21:54:56] Build finished
You should to fix your artifact dependency rule. In your setup:
TeamCity downloads artifacts to /tmp directory
TeamCity tries to upload *.deb from directory folder which is not equal to /tmp
So correct artfact dependency rule should look like this:
*.deb => .
I followed the tutorial for glide usage.
I did glide init and a glide.yaml was created successfully. Post that, when I did glide update, I am getting below error. Any idea how do I resolve this?
I installed glide using go get github.com/Masterminds/glide
Note: I am doing these operation on Windows via Git Bash terminal.
(Not sure, but if GOPATH value is required, it is /c/Users/aagoyal/eclipse-workspace-oxygen/GoPath/:/d/Edge_OSS/code/microservice/NE3SProto/. And my code is in location /d/DAAAS/Edge_OSS/code/microservice/NE3SProto/src/ne3s)
$ glide update
[INFO] Downloading dependencies. Please wait...
[INFO] --> Fetching updates for github.com/gorilla/mux
[INFO] Resolving imports
[INFO] --> Fetching updates for github.com/gorilla/context
[INFO] Downloading dependencies. Please wait...
[INFO] Setting references for remaining imports
[INFO] Exporting resolved dependencies...
[INFO] --> Exporting github.com/gorilla/context
[INFO] --> Exporting github.com/gorilla/mux
[INFO] Replacing existing vendor dependencies
[ERROR] Unable to export dependencies to vendor directory: Error moving files: exit status 1. output: Access is denied.
0 dir(s) moved.
In my case, I was getting the same error when running Glide on Windows in an automated build environment. It seemed to be a problem moving the files from whatever temp directory Glide was using into the final vendor directory.
For me, I was able to get around the issue by overriding the GLIDE_TMP environment variable such that it was located in my project's build directory. So, in your case, you can try either setting the GLIDE_TMP variable to a working directory near your project directory, or using the glide --tmp value argument to do so just once as part of each Glide command
e.g. (assuming Bash terminal):
GLIDE_TMP=/d/DAAAS/Edge_OSS/code
glide update
or
glide --tmp /d/DAAAS/Edge_OSS/code update
If that temp directory doesn't work, you could instead try using your /d/DAAAS/Edge_OSS/code/microservice/NE3SProto/src/ne3s project directory as the temp directory, in which case Glide will temporarily create a random glide-vendor1234567 subdirectory there until it moves the files to vendor.
I'm using heroku, play framework (v 2.2.1)
and IntelliJ IDEA as IDE.
Everything has already worked but when I added maven as framework support in IntelliJ, when I pushed again, my application wasn't recognized as a play app.
Here is my log when I push:
-----> Java app detected
-----> Installing OpenJDK 1.7... done
-----> Installing settings.xml... done
-----> executing /app/tmp/cache/.maven/bin/mvn -B -Duser.home=/tmp/build_78991f
d-32f6-43df-856c-f9059e8fa59d -Dmaven.repo.local=/app/tmp/cache/.m2/repository
s /app/tmp/cache/.m2/settings.xml -DskipTests=true clean install
[....]
[INFO] ------------------------------------------------------------------
------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------
------
[INFO] Total time: 2.387s
[INFO] Finished at: Tue Jan 07 14:57:19 UTC 2014
[INFO] Final Memory: 8M/514M
[INFO] ------------------------------------------------------------------
------
-----> Discovering process types
Procfile declares types -> web
-----> Compressing... done, 74.7MB
-----> Launching... done, v8
http://javaepidroid.herokuapp.com deployed to Heroku
To git#heroku.com:javaepidroid.git
f809301..b319499 master -> master
My app directory is in the root directory's repository.
Had anyone already has this kind of issue with heroku ?
As describe in this buildpack from github/heroku (for play2 apps) :
You need that your application is :
a sbt application, ie, one file matching one of these pathes :
root-app/*.sbt
root-app/project/*.scala
root-app/.sbt/*.scala
root-app/project/build.properties
a play application, ie. has this file : root-app/conf/application.conf
But you may also specify the buildpack of your heroku app :
$ heroku config:set BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-scala.git
As said in heroku documentation
I created a small app in play 2.0-RC2, but I can't push it to heroku. The error I'm getting is:
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
[warn] play:sbt-plugin:2.0-RC2 (sbtVersion=0.11.2, scalaVersion=2.9.1)
[warn]
[error] {file:/tmp/build_lhsutbwdl8uo/project/}default-be7cb3/*:update: sbt.ResolveException: unresolved dependency: play#sbt-plugin;2.0-RC2: not found
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? ! Failed to build app with SBT 0.11.0
! Heroku push rejected, failed to compile Scala app
I thought heroku just doesn't support play 2.0-RC2, but apparently James Ward succeeded pushing play 2.0-RC2 app to heroku :/ (http://www.jamesward.com/2012/02/21/play-framework-2-with-scala-anorm-json-coffeescript-jquery-heroku)
It looks like they broke something with the RC2 dependencies. I just updated an RC2 project to RC3 and it ran fine on Heroku. Just update the following line in project/plugins.sbt to update to RC3:
addSbtPlugin("play" % "sbt-plugin" % "2.0-RC3")