Titanium won't run iPhone/Android Emulator - android-emulator

I just installed Titanium SDK (1.5.1) and all the Android SDKs.
Also, I already have iPhone SDK 4.2 installed.
I downloaded KitchenSink and imported it into Titanium but whenever I try to run it on iPhone Emulator, I get this error:
[INFO] One moment, building ...
[INFO] Titanium SDK version: 1.5.1
[INFO] iPhone Device family: iphone
[INFO] iPhone SDK version: 4.0
[INFO] Detected compiler plugin: ti.log/0.1
[INFO] Compiler plugin loaded and working for ios
[INFO] Performing clean build
[INFO] Compiling localization files
[INFO] Detected custom font: comic_zine_ot.otf
[ERROR] Error: Traceback (most recent call last):
File "/Library/Application Support/Titanium/mobilesdk/osx/1.5.1/iphone/builder.py", line 1003, in main
execute_xcode("iphonesimulator%s" % iphone_version,["GCC_PREPROCESSOR_DEFINITIONS=LOG__ID=%s DEPLOYTYPE=development TI_DEVELOPMENT=1 DEBUG=1 TI_VERSION=%s" % (log_id,sdk_version)],False)
File "/Library/Application Support/Titanium/mobilesdk/osx/1.5.1/iphone/builder.py", line 925, in execute_xcode
output = run.run(args,False,False,o)
File "/Library/Application Support/Titanium/mobilesdk/osx/1.5.1/iphone/run.py", line 31, in run
sys.exit(rc)
SystemExit: 1
And for Android, it runs the OS but not the KitchenSink app, here's the log:
[INFO] Launching Android emulator...one moment
[INFO] Building KitchenSink for Android ... one moment
[INFO] plugin=/Library/Application Support/Titanium/plugins/ti.log/0.1/plugin.py
[INFO] Detected compiler plugin: ti.log/0.1
[INFO] Compiler plugin loaded and working for android
[INFO] Titanium SDK version: 1.5.1 (12/16/10 16:25 16bbb92)
[INFO] Waiting for the Android Emulator to become available
[ERROR] Timed out waiting for android.process.acore
[INFO] Copying project resources..
[INFO] Detected tiapp.xml change, forcing full re-build...
[INFO] Compiling Javascript Resources ...
[INFO] Copying platform-specific files ...
[INFO] Compiling localization files
[INFO] Compiling Android Resources... This could take some time
Any ideas on how to get Titanium to work?

I finally managed to fix it.
About the adb file, just copy or symlink it from /platform-tools to /tools and Titanium will recognize the SDK.
About the Titanium errors, here's what I did:
1 - First I downloaded the latest Titanium SDK build (1.6.0) from http://builds.appcelerator.com.s3.amazonaws.com/index.html
2 - Installed it by unzipping the file's contents (a folder called 1.6.0) /Library/Application Support/Titanium/mobilesdk/osx
3 - I then uninstalled my Xcode 1.2.5 with SDK 4.2
NOTE: If you have other versions of Xcode installed, REMOVE them and only reinstall the latest version of it, or Titanium will not work. (At least that was the case with me)
4 - Uninstalled Titanium
5 - Reinstalled Xcode with SDK 4.2
6 - Reinstalled Titanium
7 - Open it, create or try to run an old project and it will work for both iPhone and Android.
Hope it helps.
Cheers.

Exactly the same error here - really frustrating. I'm a pretty seasoned coder but Titanium has just sucked the life out of me today. Errors finding adb in the latest Android SDK so I needed to use an older SDK and now this - vanilla install - nothing wacky going on, followed their instructions perfectly but not dice. I know I haven't paid for anything yet but it still pisses me off that developers overpromise the readiness of software that obviously isn't ready for primetime.

Finally, I managed to fix my version of this issue (iPhone sim - I haven't tried Android).
First, upgrade xcode and the IOS SDK to a recent version (4.2 in my case)
Then open the projet in xcode. The file is /build/iphone/yourproj.xcodeproj
Then you will see that there is no Base SDK selected.
Select the SDK by the following menus...
XCode \ Project \ Edit Project Settings \ Build \ Base SDK - iOS Device 4.2
XCode \ Project \ Edit Active Target ‘[project name]’ \ Build \ Base SDK - iOS Simulator 4.2
Build the project in xcode (it'll probably fail)
Save and exit. Go back to Titanium and the project should now build.
Bit of a headache to get started, but there you are.

Related

No toolchains found in the NDK toolchains folder for ABI with prefix: arm-linux-androideabi

I was working on a Flutter project and everything was working fine until I updated My Android Studio and some of the SDK tools. Then when I was trying to run my project, I was getting the Error below:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:stripDebugDebugSymbols'.
> No toolchains found in the NDK toolchains folder for ABI with prefix: arm-linux-androideabi
* 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](https://help.gradle.org)
BUILD FAILED in 1m 4s
Exception: Gradle task assembleDebug failed with exit code 1
So what have gone wrong? What should I do?
The main reason is that NDK 23 has different toolchain than the previous versions of NDK (22-), so the old version of AGP (Android Gradle Plugin) has not idea where to find the executables for different ABIs.
For me, simply update the AGP version in the build.gradle in your Android project root to 4.0+, such as
dependencies {
classpath "com.android.tools.build:gradle:4.0.1"
...
This will resolve the problem.
Note: You will need to set the environment variable ANDROID_NDK_HOME to your NDK 22- location, even Google's document does not require that or says it is deprecated.
If you want to stick to the current version of AGP, there is another work around, simply add this
android {
android.ndkVersion "21.4.7075529" // (or whichever NDK 22- version you have installed)
...
to your module's build.gradle (not the build.gradle of your project)
Some other ways to work around this can be found here, Configure the NDK for the Android Gradle plugin
Well I solved the issue in 2 different ways:
A. I downgraded my NDK from version 23.0.7123448 to 22.0.7026061 by simple steps below:
1.Open SDK Manager from tool bar of android studio or from settings menu (File --> Settings --> Appearance and Behavior --> System Settings --> Android SDK).
Select the SDK Tools tab and from the Bottom Right of the window check the Show package details. Then simply uncheck any version you want to delete and select Apply.
(For me removing version 23.0.7123448 and get to 22.0.7026061 solved the problem. But if you are still having the Error above try to lower the NDK version. The most stable NDK version is 20.1.5948944)
If you have done all the steps before, you will see the following window popping up. Hit OK and you are all set.
B. This approach might look simple but yet it does the trick. Simply create a new Flutter project and get all you work (lib folder, assets, etc) to the new project.
Environment
OS : Big Sur 11.1
npm 7.24.0
node v14.15.5
react-native-cli: 2.0.1
react-native: 0.63.4
Command
react-native run-android
Error
*What went wrong:
Execution failed for task ':app:stripDebugDebugSymbols'.
No toolchains found in the NDK toolchains folder for ABI with prefix: arm-linux-androideabi
Fix
Checking Android SDK Tools, NDK (side-by-side):
In the android toolbar go to:
Tools >> SDK Manager
![Tools-SDK][1]
Then in the popup aside navigation go to:
Appearance & Behavior >> System Settings >> Android SDK

Click “SDK Tools”
Check the box next to show package details

Solution:
Downgrade
References
Idea for downgrade: Taba's solution
Here's what worked for me
I updated AGP to 4.1+ in my Android Project root build.gradle
dependencies {
classpath "com.android.tools.build:gradle:4.1.0"
...
AGP 4.1+ supports only gradle version gradle-6.5 above
so I updated the distributionUrl in gradle-wrapper.properties file located in gradle/wrapper folder
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
Get more info here
what worked for me was
I change my Gradle dependencies from 3.5.1 to 4.0.1
dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
}
which is under build.gradle
The minimum Gradle support for Gradle dependencies(gradle:4.0.1) is gradle-6.1.1
if your gradle version for the project is below that you will have to change it by downloading a higher version or if you have it and you're using a wrapper, you will have to change the distribution to the one higher or same as the 6.1.1 version.
which is under >gradle >wrapple >gradle-wrapple.properties
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
You might most likely need to add to your NDK
for Gradle-6.7 the supported NDK is NDK(side by side) version 21.0.6113669
which is under >tools >sdk manager(android SDK) >sdk tools >ndk side by side
click show package details click and download the appropriate one for you
I clean all SDK folders in c:\Users\User\AppData\Local\Android\Sdk\ndk\
Recent AppCenter android dependencies changes caused my android builds to fail with this error:
No toolchains found in the NDK toolchains folder for ABI with prefix: arm-linux-androideabi
Our solution was to upgrade the gradle version from 3.5.4 to 4.0.1 in the root build.gradle file:
dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
Additional answer for #gwang and #TillyJonesy:
When running Gradle command with --info(AGP 3.5.4 for me), you will see that when no NDK version was given, AGP will try to use the highest NDK version.
And from the docs of Android NDK guidance, AGP <= 3.5 has no default NDK version.
See: https://developer.android.com/studio/projects/install-ndk#default-ndk-per-agp
Solution for native android developers
Go to File->Settings->Appearance & Behaviour->System Settings->Android SDK-> then select SDK Tools and check 'Show Package Details' from bottom.
in Dropdown of NDK(Side by Side) ,check 22.1.7171670 and uncheck remaining then apply and click ok.

ionic phonegap-facebook-plugin iOS build - CompileC build error

The plugin had been working beautifully up until last night. Getting the following errors on iOS only after updating to latest Ionic/Cordova (android is fine).
Updated to:
xcode version 7.2.1
ionic version 1.7.14
I have also tested the same app with another mac running previous version of ionic 1.7.13 and cordova 6, and all is good.
After testing with the older version, i built a new mac (fresh wives laptop) with the latest ionic setup and again same error.
Here's the plugin in question https://ionicthemes.com/tutorials/about/native-facebook-login-with-ionic-framework
The following build commands failed:
CompileC build/testFresh.build/Debug-iphonesimulator/testFresh.build/Objects-normal/i386/FacebookConnectPlugin.o testFresh/Plugins/phonegap-facebook-plugin/FacebookConnectPlugin.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
ERROR running one or more of the platforms: Error code 65 for command: xcodebuild with args: -xcconfig,/Applications/AMPPS/www/ionic/testFresh/platforms/ios/cordova/build-debug.xcconfig,-project,testFresh.xcodeproj,ARCHS=i386,-target,testFresh,-configuration,Debug,-sdk,iphonesimulator,build,VALID_ARCHS=i386,CONFIGURATION_BUILD_DIR=/Applications/AMPPS/www/ionic/testFresh/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Applications/AMPPS/www/ionic/testFresh/platforms/ios/build/sharedpch
You may not have the required environment or OS to run this project
After banging my head against a wall for a few days, I found that others were having the same issue though it was labeled as a "cordova 6" problem.
Original github issue:
https://github.com/Wizcorp/phonegap-facebook-plugin/issues/1227
Eventually whilst scrolling through known bugs under github for "phonegap-facebook-plugin" i noticed that similar errors had occurred on a previous release, then super Jeduan re-wrote the plugin and released it under the following:
Plugin fix:
https://github.com/jeduan/cordova-plugin-facebook4
The above appears to be working find under cordova 6, xcode version 7.2.1 and ionic version 1.7.14

Titanium Appcelerator Running error on iOS 9.2

Device: iPhone 5 (Model A1429)
iOS version: 9.2 (13C75)
Titanium SDK: 4.0.0.GA
When I tried to run/distribute my app, I faced this error messages
[ERROR] : ** BUILD FAILED **
[ERROR] : The following build commands failed:
[ERROR] : Ld build/iVirtue.build/Debug-iphoneos/iVirtue.build/Objects-normal/arm64/iVirtue normal arm64
[ERROR] : (1 failure)
The warning in TiApp Editor > Deployment Targets said
iOS development requires [5.0, 9.0) but you have 9.2
Initially, when I haven't updated my Titanium Studio and my iOS version, the app was running perfectly. Please help.
I didn't clearly explain it before. The app i made was made on Titanium Studio, so installed the Appcelerator Studio and have the app exported. Now, it's working well. Thank you all, now i can close this matter.
Try to update the Titanium SDK to the latest 5.1.2.GA & all other components as well, because as you said that the app was working fine before so it is something related to the updates.
Use Titanium Studio to update everything available.
This seems to be a problem in your run configuration (or tiapp.xml). I suggest you first delete the run configuration, run the app again to define a new run configuration. Also check tiapp.xml to see if you have any references to iOS version?
You should also clean your project prior to running it after having deleted the run configuration :-)
/John

cordova build error: SDK "iphoneos6.0" cannot be located

i developing a html5-App for Android and iOS. Building for Android and iOS-Simulator works like a charm. But if i want to build the app for iOS-Device the build process stops with following error:
update-ios:
cordova prepare ios
build-ios-xcodebuild:
xcodebuild: error: SDK "iphoneos6.0" cannot be located.
/Users/.../nbproject/build.xml:178: exec returned: 64
For development i using netbeansIDE, xcode 5.1.1 and cordova 3.5.
Also i downloaded the iOS 6.1 sdk and copied into sdk folder of xcode, but that don't work for me. May i have to set an environment variable?
Is there someone, who could give me a hint?
In advance

iOS - Building VLC for iOS - Please install required SDK, or set SDKROOT manually

I have upgraded my xcode to 4.5, now I am Building VLC for iOS and countered that SDK version 5.1 not found. I have fully installed all the sdk's in my xcode 4.5
Mac-Muhammad-Umair-Mirza:vlc muhammad.umair$ ./extras/package/ios/build.sh
[info] Building libvlc for the iOS
[info] Using armv7 with SDK version 5.1
usage: dirname path
SDKROOT not specified, assuming /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk
*** /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk does not exist, please install required SDK, or set SDKROOT manually. ***
Please help me out in finding the solution.
Do the following:
export /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS*.*.sdk
where "*.*" is your current SDK (for instance 6.1).