I am following this tutorial to create .apk file:
http://docs.sencha.com/touch/2-0/#!/guide/native_android
On step#4 when I run the following command nothing happens:
sencha package run packager.json
Absolutely nothing happens. There is no success/error message shown and command prompt is ready to take the next command.
Here is my config file for debugging:
{
"applicationName":"myApp",
"applicationId":"com.techleadz.myApp",
"iconName":"resources/icons/Icon~ipad_myApp.png",
"versionString":"1.0",
"outputPath":"build/",
"inputPath":"build/native/",
"configuration":"Debug",
"platform":"AndroidEmulator",
"deviceType":"Universal",
"certificatePath":"C:/Users/Administrator/.android/debug.keystore",
"certificateAlias":"androiddebugkey",
"sdkPath":"C:/android-sdk-windows/",
"orientations": [
"portrait",
"landscapeLeft",
"landscapeRight",
"portraitUpsideDown"
]
}
What I am doing wrong?
you have not specified a certificate password or an android list target you must have installed the disk image for the list target that you are trying to include and target must be atleast 7
Are you using Ubuntu ?
if so there is some problem in sencha tools for packaging for native.
Thanks
Related
Our bundle entry point is at src/index.tsx, which appears not to match the Sentry default of ./index.js.
Sentry is failing on sentry-cli react-native-xcode with the error EOF while parsing a value at line 1 column 0.
Using debug log level, I see:
+ ENTRY_FILE=index.js
...
Error: The resource `/Users/lukecwilliams/Projects/mobile2mr/index.js` was not found.
And in the actual CLI command, this is being run: --entry-file index.js
We need instead --entry-file src/index.tsx. How can we customize this? I can't find an answer in the docs or source code.
I've found this solution (custom build script) but it's still not working.
I have a script in the project root:
sentry-cli-xcode-build.sh:
./node_modules/react-native/packager/react-native-xcode.sh ./src/index.tsx
And in the build command in project.pbxproj:
shellScript = "export SENTRY_PROPERTIES=sentry.properties\nexport EXTRA_PACKAGER_ARGS=\"--sourcemap-output $DERIVED_FILE_DIR/main.jsbundle.map\"\nexport NODE_BINARY=node\n../node_modules/#sentry/cli/bin/sentry-cli react-native xcode ../sentry-cli-xcode-build.sh";
But the result is a fairly ambiguous: error: Permission denied (os error 13)
Do I need to change the directory setup somehow? I don't see a concrete example in Sentry docs or the GH answer above regarding where to put the script and how to reference it exactly.
It turns out that this build step should simply be disabled in iOS projects using Bitcode (which is the default). So, we have no more need to run a custom build script.
We'll use Fastlane afterward to upload debug symbols.
Docs for reference:: https://docs.sentry.io/platforms/react-native/#ios-specifics
The answer is
export ENTRY_FILE=index.ios.js
in the script
I want to display a pdf in my react-native app. I used documentation from https://www.npmjs.com/package/react-native-pdf. I installed rn-fetch-blob and react-native-pdf. i have linked react-native-pdf .
but when i ran command "react-native link rn-fetch-blob" it didn't get linked.
and i got the following message in command prompt:
rn-fetch-blob will not automatically add Android permissions after 0.9.4
please run the following command if you want to add default permissions :
RNFB_ANDROID_PERMISSIONS=true react-native link
I tried this command and i got:
"'RNFB_ANDROID_PERMISSIONS' is not recognized as an internal or external command,
operable program or batch file."
I am using this version: react-native-cli: 2.0.1
react-native: 0.59.8
I also tried to set it manually with the reference https://github.com/wkh237/react-native-fetch-blob/wiki/Manually-Link-Package
I was to set it in 3 files according to the last reference i provided -
I used first: "node_modules/rn-fetch-blob/android/build.gradle" (which is "android/app/build.gradle" in documentation )
I used second: "node_modules/rn-fetch-blob/android/src/main/java/com/RNFetchBlob/RNFetchBlob.java" (which is "MainApplication.java" in documentation )
third file was "android/settings.gradle" which i didn't find in "node_modules/rn-fetch-blob/android/"
so i bacame unable to set it manually.
May be I am using wrong file paths to set it manually. If any one have any idea about it or any suggestions for me to solve it in a better way. please help me out.
Or if any other way to solve "displaying a pdf in react-native" please provide me that also.
linking problem is solved after setting it manually and than by using command set RNFB_ANDROID_PERMISSIONS=true in command prompt.
But now still getting an error after using in code import Pdf from 'react-native-pdf'; . the error is shown below.
anyone having idea about it. or any other way to display a pdf in react-native, kindly let me know.
If you run this command "rn-fetch-blob": "^0.10.13",install this version is worked for me,if you install another one your app was crashed/stoped.
when I try to run my app on the iOS simulator I get the error :
Error running xcrun simctl openurl booted exp://localhost:19000: An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=60):
The operation couldn’t be completed. Operation timed out
Operation timed out
Error installing or running app. Error: Process exited with non-zero code: 60
any idea how to solve this error ?
This usually is an error with the Simulator. If you remove expo (delete the app) from the simulator and run the command again, it should build fine.
However, if it still fails, Erasing all content and settings on the simulator does the trick too.
FOUNT IT!
you must have a .watchmanconfig file (like below)
File example
When you initialize a project with expo init "projectname", there is no .watchmanconfig file.
So, create one and in this file, just initialize an empty object like this : {}
Then you can start with expo start or yarn/npm start
It solved all my problem.
Hope it does for you too.
For anyone like me also searching this issue, it is possible to un-eject your app and run again like normal. From the docs, Delete the ios and android directories from your project. Delete the isDetached and detach keys from your project's app.json. You can now use your project like a normal Expo project (with no ExpoKit). Read more at https://docs.expo.io/versions/latest/expokit/advanced-expokit-topics/
It may be an issue with some outdated simulators in your simulator cache. On MacOS remove the sub-directories in the following directory:
~/Library/Developer/CoreSimulator/Caches/
check if you have .watchmanconfig file present in root, if not create one .watchmanconfig and initialize empty object and run command npm start again
Hope you could help me here:
I'm currently building an app which I created through CRNA and then ejected. I get the ios version right on but I'm currently struggling a lot with the android version.
When running react-native run-android all I can get is the following error:
Error type 3
Error: Activity class {com.myapp/com.myapp.MainActivity} does not exist.
I've checked app/build.gradle, app/src/main/AndroidManifest.xml, app/src/main/java/com/myapp/MainActivity.java and app/src/main/java/com/myapp/MainActivity.java for name errors on package. I've tried moving from com.myapp to com.mebius.myapp and com aswell.
Seems this comes from the only plugin I'm using. I'm keeping on the investigation
Any hints?
There are 3 possible reasons for the android app build fails to make
1. You need to define sdk path in android/local.properties
if local.properties doesn't place then make a file names with that
add
sdk.dir = home/user/AndroidApp/local/Sdk
You can match with their system path..
2. Your genymotion or avd must enable with the android studio
3. You must have to go with the following command
npm start
in new terminal .
Please go through with it.
Thanks
Actually I had a problem with my gradle config which look like:
include ':react-native-sensors'
project(':react-native-sensors').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-sensors/android')
rootProject.name = 'accelapp'
I needed to add: include ':app'
I don't know if it's due to the process of ejecting from CRNA or if it's due to react-native link react-native-sensors though.
EDIT After some investigation, I couldn't reproduce this issue. This leads me to say it was a faulty copy/paste...
I dont understand this error message, when I run the following command I get:
C:\projectsGit\mybipper\portal\bk-servlets\src\main\webapp\parentapp>sencha package build ../nativeBuild/packager.json
[INFO] The application was successfully packaged
Bundle Seed ID is missing from config file
Failed to package application
My packager.json is :
{
"applicationName":"MobileKids",
"applicationId":"TC3BU5LD52.com.bipper.mobilekids",
"versionString":"1.1",
"iconName":"icon.png",
"inputPath":".",
"outputPath":"../build",
"configuration":"Debug",
"platform":"iOS",
"deviceType":"Universal",
"certificatePath":"Certificate_key.p12",
"certificateAlias":"iPhone Developer: Thomas Vervik (TC3BU5LD52)",
"sdkPath":"C:/Program Files (x86)/Android/android-sdk",
"orientations": [
"portrait",
"landscapeLeft",
"landscapeRight",
"portraitUpsideDown"
]
}
This was a bug in ST2: http://www.sencha.com/forum/showthread.php?192946-2.0.1RC-Native-build-seem-to-be-broken&s=5fd0b1665305e83413dea48c9b4ee510
Are you running the latest version? Also, there are some workaround provided in the above post.