Appcelerator Studio - cannot build app with studio - titanium

I'm not quit sure what happend, but since a few days I'm getting following error when trying to build my appc titanium app directly from the appcelerator studio:
[ERROR] : "Resources" directory not found
[ERROR] : Ensure the "Resources" directory exists and contains an "app.js" file.
When I compile it from the commandline it works
$ appc alloy compile --config platform=ios && appc ti build -p ios
Appc Version
6.2.4
Appc Ti Version
5.0.14
I need to use this versions since the app is a bit old and it is recommended to build them with that toolchain.
However - everything worked before.
Now I have to rebuild with alloy before building.
How can I fix that, so that I'm able to build directly from the studio?

Related

compile apk on a folder "Android" already created previously in react-native

I'm new to react-native, I've seen tutorials but everyone uses expo. I downloaded this project where they don't use expo. I want to compile this application for android, to finally get an .apk
This application already has a folder called "Android" but inside it does not have its respective .apk. How can I generate it?
this is the repository:
https://github.com/zsajjad/BusinessCard
It would be great if you can attach screenshots of how I should do it
Note. I have the latest version of android studio and I don't see the option of "build"
commands like "gradlew" from the console, they don't work, it's as if I didn't have that command installed
Following instructions for build apk using android studio
Hope you installed node and react native on your machine. If not
please follow the link to install it.Install node and react native
open your command prompt or terminal and redirect to your download project - cd /Businesscard Master (change it according to your project location)
Now enter - npm install
Enter - react-native link
Follow the android related linking instructions on following link react native camera
Hope you know about android camera and storage permissions.
same thing for react native text detector. Because your downloaded project have that packages in package.json
Now open your project android folder in android studio using open existing android project.
Then select build your project from android studio build menu and run it also
Generate apk using build menu- same process you have to follow for native android project
You don't need to use the CLI, that's needlessly complicated and it obscures what Android Studio is actually doing. Here's all you need to do.
Open the whole /Android/ folder in Android Studio. This is your "project" similar to how you open a *.xed file in XCode. Except in Android Studio, you just open up the whole folder to get the build.
Android Studio will now prepare your project using Gradle. If there are any errors in the preparation it will tell you about them. Assuming your gradle and Android Studio versions are compatible and you got no errors, you're now ready to emulate, debug and create a production build. At this point the workflow is similar to using XCode. You'll see emulators under Tools -> AVD Manager.
In the file menus go to Build->Generate APK. You can choose between signed APKs, debug APKs and so on. You'll need the key file if you're signing the APK on your computer, otherwise there's also Google Play signing after you upload the APK.
TL;DR: Just open your /Android/ folder in Android Studio.
Side note: When Android Studio gives you popups to upgrade stuff don't do it. NEVER upgrade Gradle or Android Studio unless the RN / Expo team specifically ask you. This will break your whole project and you will need to rebuild the platform.

error in setting of android in sdk and gradle to run cordova comand in ionic

I’m setting up a new apk in ionic and want to run app in mobile to release apk
. This is windows
ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=D:\sdk (DEPRECATED)
Could not find an installed version of Gradle either in Android Studio,
or on your system to install the gradle wrapper. Please include gradle
in your path, or install Android Studio
If you are using Cordova version >= 7 or Android SDK Tools >= 26 you need to manually install gradle (reference). On Windows you can install gradle like this:
Download the binary release from https://gradle.org/releases/
Unzip it to any folder you like, for example C:\gradle
Edit your system environment variables to include the directory C:\gradle\bin (where gradle.bat is located`)
Afterwards you should be able to build your project normally.

Titanium Appcelerator **BUILD FAILED**

Getting the following error when I try to run my program on an iOS device
[INFO] : Invoking xcodebuild
[ERROR] : ** BUILD FAILED **
There is no other information displayed in the console about why the build has failed. I don't think my code is the issue because
It runs fine on the simulator, and
I tried running an example "Hello World" app and the same error occurred
I have recently updated my certificates and provision profiles, which is when this error started occurring.
I am running:
Node.js Version = 8.9.1
npm Version = 5.5.1
Appcelerator studio Version = 5.1.1.201809051655
Titanium SDK Version = 7.5.0.GA
Xcode Version = 10.1
Based on other forum posts that I have read, I have tried:
Cleaning the project
Using an older version of the Titanium SDK
Deleting old provision profiles from Xcode
Deleting old certificates from the keychain
Assigning correct provision profile and certificate from Run > Run Configurations
Removing modules used on the project
Using devices with different versions of iOS
Really at a loss of what else to try. Any recommendations would be greatly appreciated.
You can run appc run -p ios --log-level trace which will invoke the xcodebuild command with the highest possible log level. After that, the actual error will be shown. Most likely you are using a 3rd party module that is missing a framework link. If you got the log, you can paste it into a GitHub Gist and send it here, then we can find it for sure.

React Native IOS Build CFBundleIdentifier Does not Exist

I have create sample React Native project and following the tutorial as per react native website.
I have try to run the application IOS simulator, its throwing error as below ,
** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution Install\ Third\ Party /Users/Test/Documents/REACTJS/SampleReactNative/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Script-190EE32F1E6A43DE00A8543A.sh
(1 failure)
Installing build/Build/Products/Debug-iphonesimulator/SampleReactNative.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/SampleReactNative.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
my environment setup information,
node version v9.8.0 npm version 5.6.0 react-native-cli: 2.0.1
react-native: 0.54.2 xcode 9.2
Please help us to resolve the issues.
I have the same problem right after init:
react-native init myapp
cd myapp
react-native run-ios
..although run-android was fine.
Not a solution but a workaround for the moment, maybe be to init using a lower version of RN:
react-native init myapp --version react-native#0.51.0
That builds okay.
Similar in an existing project, install an older version of RN.
Other versions before 0.54.2 might work but I haven't tried.
(edited 2018/4/2)
Found my solution from this link: https://github.com/facebook/react-native/issues/18238
RN 0.54 requires types available since iOS 11. So you have to upgrade your xcode and set minimum iOS version in your app to 11
In short, upgraded OSX & Xcode to the latest. (As of today, OSX 10.13.4 Xcode & 9.3)
This may happen because of some library files not found.You need to follow some steps That I have done and it is worked perfectly for me.
1.) go to Xcode project -> Target -> select build Phase -> Go to target dependies -> Click on + -> add "react" and press add.
2.) Xcode > Product -> scheme > manage sceme -> click on + button -> targetName(React) -> Okay -> make shared of this by select checkbox under shared column.
3.) Clean your project and try to build, If it is getting some error like "glog/logging.h file not found" or "cofig.h file not found" in Xcode and "CFBundleIdentifier not exist" then do not worry. You are just one step far. This is may occurs if you are missing config.h file, For this you need to update config.h file. For this
4.) follow below steps
a.) close your Xcode
b.) Open terminal with the project (Or you can directly left click your project and drag your folder to closed terminal, [It will automatically take the path from your that corresponding folder])
c.) write command
cd node_modules/react-native/third-party/glog-0.3.4/
d.) Run the configure scripted file by the command
./configure
e.) now close terminal and go to terminal with your project root path. now try final run your iOS project by
react-native run-ios
For XCODE 10.0,
I did two things
1) check out this answer
which basically says
Go to File -> Project settings
Click the Advanced button
Select "Custom" and select "Relative to Workspace" in the pull down
Change "Build/Products" to "build/Build/Products"
2) If (1) doesn't work for you then open your project from xcode
go to project navigator and select your project name --> go to info --> use debug for command-lines builds.
do this
3) go to terminal and react-native run-ios
Run the command:
react-native upgrade
react-native run-ios
or:
react-native run-android
Try to add CFBundleIdentifier in the Info.plist as:
<key>CFBundleIdentifier</key>
<string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string>
I experienced this issue due to the xcode 12 upgrade, and I solved my problem by upgrading my rn by using this command:
react-native upgrade
then go to podfile change your:
pod 'ReactCommon/callinvoker', :path => "../node_modules/react-native/ReactCommon"
to:
pod 'React-callinvoker', :path => "../node_modules/react-native/ReactCommon/callinvoker"
Do you have CFBundleIdentifier in your Info.plist?
If not than add it for eg. com.ios.learning
Usually, this error comes up due to inconsistent versions (either of react-native, OS or XCode). I had the same issue with react-native v0.57.0 on MacOS Sierra and XCode v9.x.
All I had to do was to upgrade to High Sierra and then XCode to v10.0.
Otherwise, you'd have to use an older version of react-native either by downgrading it
or by initialising a project with an older version
react-native init test --version react-native#0.x.x
In my case, just delete the build directory, Pods directory, node_modules directory and running yarn install, pod install and npx react-native run-ios solves the issue.
React Native is trying to install your app on a different app name for some reason. What you can do is in Xcode --> build settings --> packaging --> change the product name to the one given in the path which the simulator is trying to install.
Look at this: https://amala-gopal.medium.com/entry-cfbundleidentifier-does-not-exist-6098b90516f6
npm uninstall react-native
delete ios and android folder
then run :
npm install react-native
react-native upgrade

Titanium Studio Installation - Not able to run Hello World program in Android EMULATOR

Not able to run my first application disappointing!
I have installed the required software from Titanium studio. Software installed are
JAVA JDK, NODE.JS, Android SDK,.. and the rest of Titanium tools.
After Android SDK installation successful.I tried creating a sample Hello world application and tried running in Android Emulator received following error.
" --skip-js-minify was unexpected at this time.
C:\Users\AAA\Documents\Titanium_Studio_Workspace\myFirstApp> "C:\Users\AAA\AppData\Roaming\npm\node.exe" "C:\Users\AAA\AppData\Roaming\npm\node_modules\titanium\bin\titanium" --no-colors --no-progress-bars --no-prompt build --platform android --sdk 3.2.2.GA --log-level trace --target emulator --android-sdk C:\Users\AAA\Android.SDK --device-id "10.1" WXGA (Tablet)" --skip-js-minify
[ERROR] Application Installer abnormal process termination. Process exit value was 255
Not sure what is the problem tried re installing the studio No luck.
Thx
umral