So I'm trying to get my react native software to run and it's popping up with an error saying The SDK directory 'C:\Program Files\Android\Android studio; ' does not exist. How can I fix this?
Lookup 2 places:
Possible duplicate of your question
React Native start Guide
If you installed all necessary things listed in guide just do:
react-native init YOURPROJECTNAME
and after build add local.properties file in android folder of your app.
It should contain line: sdk.dir = C:\\Users\\USERNAME\\AppData\\Local\\Android\\sdk
Related
I had a old React-Native project which I wanted to give it a try again and when trying to run the project on iOS (Android works perfect) I get the error that Debug-iphonesimulator/GeneratedInfoPlistDotEnv.h file not found.
If I run the project from the command react-native run-ios, than the build will succeed.
What can cause this issue and how can it be fixed?
I have tried to fix it with the comments from this issue but no success.
React-Native verision: 0.47
Full error:
<built-in>:1:10: fatal error:
'/Users/myUser/Library/Developer/Xcode/DerivedData/Project-gcaxrvbcwgkfhkadevoqxcprxszw/Build/Products/Debug-iphonesimulator/GeneratedInfoPlistDotEnv.h' file not found
I fixed by copying file GeneratedInfoPlistDotEnv.h (in /ios/build/Build/Products/) to the path mentioned in the error message.
The path mentioned in error message for simulator is not same as real phone, you need to copy for a second time.
The development for React Native just like droped in a deep black hole, what you need to do is just climb and climb and climb...
Changing the Info.plist preprocessor prefix file to works for me ${CONFIGURATION_BUILD_DIR}/../GeneratedInfoPlistDotEnv.h
Image of code in Xcode 9
If you're coming from React version 0.60 and above, you should be referencing the package from GitHub instead of NPM. The author hasn't released auto-linking support on NPM yet, even though it's already merged!?
Try these steps after you unlink and uninstall the existing version of react-native-config. Remember to revert to default Info.plist preprocessor settings in XCode build settings.
yarn add https://github.com/luggit/react-native-config.git
cd ios && pod install
You don't have to add any other post-install scripts, just run the app like usual and it should work fine. Make sure you undo any other fixes before doing this.
I am trying to simulate a project with ionic using the command ionic emulate ios. I have installed xcode last version on mac Sierra. But no work. this is the error:
** BUILD SUCCEEDED **
No target specified for emulator. Deploying to iPhone-SE, 10.2 simulator
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=163):
Unable to lookup in current state: Shutdown
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=163):
Unable to lookup in current state: Shutdown
Error: ENOENT: no such file or directory, stat '/var/root/Library/Logs/CoreSimulator/4A052961-F773-4156-9D6C-76F137CC761B/system.log'
I found this solution(https://forums.developer.apple.com/thread/66665) but no work for me.
https://cordova.apache.org/docs/en/latest/guide/platforms/ios/
Open a Project within Xcode
Cordova for iOS projects can be opened in Xcode. This can be useful if you wish to use Xcode built in debugging/profiling tools or if you are developing iOS plugins. Please note that when opening your project in Xcode, it is recommended that you do NOT edit your code in the IDE. This will edit the code in the platforms folder of your project (not www), and changes are liable to be overwritten. Instead, edit the www folder and copy over your changes by running cordova build.
Plugin developers wishing to edit their native code in the IDE should use the --link flag when adding their plugin to the project via cordova plugin add. This will link the files so that changes to the plugin files in the platforms folder are reflected in your plugin's source folder (and vice versa).
Once the ios platform is added to your project and built using cordova build, you can open it from within Xcode. Double-click to open the ${PROJECT_NAME}/platforms/ios/${PROJECT_NAME}.xcodeproj file. The screen should look like this:
https://cordova.apache.org/static/img/guide/platforms/ios/helloworld_project.png
Then follow the instructions to deploy to a simulator:
https://cordova.apache.org/docs/en/latest/guide/platforms/ios/#deploying-to-simulator
You will be able to see errors more clearly.
In my case it was the problem of an unmatched resource file. I simply deleted it.
After this, I tried:
sudo chown -R $USER:$GROUP ~/.npm sudo chown -R $USER:$GROUP ~/.config
in terminal and was able to run the app in a simulator
I have one hybrid Cordova project, which is running fine Xcode 5.1.1, but when I am trying to Archive the project in Xcode 8.2.1 with ‘Generic iOS Device’ I am getting the error ‘Cordova/CDV.h’ is not found.
I read many articles about this problem, but none could solve my problem. Most answers are telling to follow the below steps:
"Add this line to your Build Settings -> Header Search Paths:
$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include
"
I have did this but problem not solved, getting another error ‘ld: library not found for -lcrt1.3.1.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)’
Also I have changed the bitcode YES to NO in target Build Settings, but no fruitful result.
Project cordova version 3.4.0 where installed cordova version in machine 6.4.0
Has anybody experience with this kind of problem?
Please, can anyone help? I've been working on this for days.
I got it work by following below steps
In your Xcode project settings select TARGETS
Within TARGETS select the Build Settings tab
In the sub-options under the Build Settings tab be sure to select All
Scroll down to the Search Paths section
Locate Header Search Paths
Add the following configuration to the Release option (as a new value on its own line): $(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include
Clean the project: Command + Shift + K
Restart Xcode
I wanted to report that the response provided by Vinay worked for me. I had to make sure I was in the share extension target, and I added it to the path exactly as suggested above in the Release option, and did not even have to do a clean to get it to regenerate the PCH.
BUT, I was puzzled by this after looking at the setting further and I realized this path was already in the setting. I edited it again, and removed the redundant path, hit 'run' again, and it loaded onto my iPhone and ran fine.
So, I believe that just setting this in the search path forced a recompile on the share extension PCH and all is working again.
I hope this helps others.
I know its too late to answer on this question but still many developers facing the above issue and as per the latest Cordova & ionic version below steps will work in the above error.
As per new update in Cordova some time due to some permission issue or directly run or build iOS platform it's unable to add below file or folders in your iOS project platform :
CordovaLib
so somehow above folder will not add in your project and that's why it's not building your iOS project.
To overcome this issue you need to remove iOS platform from your ionic project and again add it.
Remove iOS platform: sudo ionic cordova platform remove ios
Add it again: sudo ionic cordova platform add ios
By doing this cordova download CordovaLib folder from server and add it into your iOS project and after that users can able to build their project without any error.
recently I faced this issue and I solved by doing the above steps.
Hope this helps others.
Happy coding!
Seems like the "Cordova" folder isn't getting copied into the project during cordova platform add ios
So, you'll have to copy the "Cordova" source folder into your project manually. But you'll have to download the ios source packages from github first, which is located at:
https://github.com/apache/cordova-ios
After downloading the "cordova-ios-master.zip" package and unzipping it, copy the folder named "CordovaLib" into your project next to the Xcode project file:
PROJECT_FOLDER/platforms/ios/PROJECT_NAME
PROJECT_FOLDER/platforms/ios/PROJECT_NAME.xcodeproj
PROJECT_FOLDER/platforms/ios/PROJECT_NAME.xcworkspace
PROJECT_FOLDER/platforms/ios/cordova
PROJECT_FOLDER/platforms/ios/CordovaLib <------- here
PROJECT_FOLDER/platforms/ios/ios.json
PROJECT_FOLDER/platforms/ios/platform_www
PROJECT_FOLDER/platforms/ios/pods-debug.xcconfig
PROJECT_FOLDER/platforms/ios/pods-release.xcconfig
PROJECT_FOLDER/platforms/ios/www
im working on xamarin forms at the moment every time when i start a new xamarin form project i update the xamarin forms from the nuget package every things work fine until i started to work with maps and every time i install the xmarin.forms.maps after the install is finished i try to build my solution keeps throw 8 errors.droid
the problem is in the android platform only
Severity Code Description Project File Line Suppression State
Error Please install package: 'GPS Base' available in SDK installer. Android resource directory C:\Users\IBRAHIM\AppData\Local\Xamarin\Xamarin.GooglePlayServices.Base\8.4.0\content./ doesn't exist. WorkingWithMaps.Android
Error Please install package: 'GPS Maps' available in SDK installer. Java library file C:\Users\IBRAHIM\AppData\Local\Xamarin\Xamarin.GooglePlayServices.Maps\8.4.0\content\classes.jar doesn't exist. WorkingWithMaps.Android
Error Please install package: 'GPS Base' available in SDK installer. Java library file C:\Users\IBRAHIM\AppData\Local\Xamarin\Xamarin.GooglePlayServices.Base\8.4.0\content\classes.jar doesn't exist. WorkingWithMaps.Android
Error Please install package: 'GPS Basement' available in SDK installer. Android resource directory C:\Users\IBRAHIM\AppData\Local\Xamarin\Xamarin.GooglePlayServices.Basement\8.4.0\content./ doesn't exist. WorkingWithMaps.Android
Error Reason: File C:\Users\IBRAHIM\AppData\Local\Xamarin\zips\CAA441D76F04E0D57C4110F8A00CDA7A.zip is not a ZIP archive WorkingWithMaps.Android
Error Please install package: 'GPS Maps' available in SDK installer. Android resource directory C:\Users\IBRAHIM\AppData\Local\Xamarin\Xamarin.GooglePlayServices.Maps\8.4.0\content./ doesn't exist. WorkingWithMaps.Android
Error Please install package: 'GPS Basement' available in SDK installer. Java library file C:\Users\IBRAHIM\AppData\Local\Xamarin\Xamarin.GooglePlayServices.Basement\8.4.0\content\classes.jar doesn't exist. WorkingWithMaps.Android
Error Unzipping failed. Please download https://dl-ssl.google.com/android/repository/google_m2repository_r24.zip and extract it to the C:\Users\IBRAHIM\AppData\Local\Xamarin\Xamarin.GooglePlayServices.Base\8.4.0\content directory. WorkingWithMaps.Android
ive been stuck for 3 days now pleasee HELLPPPP MEEE OUT !!!
google play services base and basement folders are empty what should id
I ended up having to do it by hand... Here are the steps though
Download zip file (https://dl-ssl.google.com/android/repository/google_m2repository_r22.zip)
Extra zip file
Go to folder you need the library for (let's say play-services-base)
Go to version (example: 8.1.0)
Rename file ending in .aar to .jar
Extract .jar file to a folder (I used 7Zip)
Copy all the contents of the folder
Go to "C:\Users{USER}\AppData\Local\Xamarin"
If doesn't exist, create needed folder (for "play-services-base" I created "Xamarin.GooglePlayServices.Base")
Created folder for version (Example: 8.1.0) and then a folder in that called "embedded"
Paste files from before into this folder
Go back to step 3 and keep repeating till all libraries are added
Ya it's a pain.... But it works
This is obviously not related to any SDK.The log clearly states the issue.
Your nuget packages are corrupted , this has happens when you try updating your xamarin forms to the latest version, along with other packages.
First
I would recommend starting a fresh project.
When installing Xamarin forms maps, ensure that all the version of the nuget package match, ensure there is no version mismatch. Do not update to the latest version. Find a mid-level stable version of the package needed and update to this. Now go to each Device specific component and check the references ensure there is no (!) under the referenced package.
Second
Navigate to your appdata directory
close visual studio.
C:\Users\john.doe\AppData\Local\ in this directory find the Xamarin folder.
Delete the "Xamarin" folder.
Open VS ===> Clean solution, and Rebuild the entire solution.
This will take a while, because you will re-download all the packages.
Viola!! Happy coding.
Thank you
i think you must have to update your SDK. then give proper permission for the map related implementation i hope that it will work fine in my case it is working good.
I am developing a cordova project. A project which is intended to run cross platform: Android, Windows phone, iOS.
I using this pushplugin to implement push notifications: the push plugin is intended to communicate between the device and the relevant push notification system (Android: GCM, Windows: WNS, Apple: APNS): https://github.com/phonegap/phonegap-plugin-push
On a windows pc, in the visual studio, I have managed to implement push notifications in a todo app. The app runs well in the cross platform solution which runs on visual studio.
Now as you may know, in a Cordova app, when building for a specific platform, folders for each platform are created as sub folders to a folder called platforms found in the project directory.
When I tried building for ios and put the project folder on a ios computer, I am opening the project in Xcode and trying to run it, but I am getting these kind of errors referring to the same push plugin:
clang: error: no such file or directory: '/Users/Jurgen/Documents/Xcode/backbonetodo/BackboneToDo/platforms/ios/BackboneToDoPluginsphonegap-plugin-pushGCMLibrarieslibGGLCloudMessaging.a'
clang: error: no such file or directory: '/Users/Jurgen/Documents/Xcode/backbonetodo/BackboneToDo/platforms/ios/BackboneToDoPluginsphonegap-plugin-pushGCMLibrarieslibGGLCore.a'
clang: error: no such file or directory: '/Users/Jurgen/Documents/Xcode/backbonetodo/BackboneToDo/platforms/ios/BackboneToDoPluginsphonegap-plugin-pushGCMLibrarieslibGGLInstanceIDLib.a'
I just copied the first 3 errors (but there are over 20).
The push plugin works fine on visual studio and normally by copying the project folder on a mac computer and running the .xcodeproject file from inside the iOS platform folder, I manage to run with no problems.
Any idea, what could be wrong? I am also notificing that after BackboneToDo there is no / and also after Plugins. It seems like the way it is creating the directory is not right. I also tried to change the location to absolute but this didnt solve the problem.
Any help?
Thanks in advance
While coping the files of deferent platforms make sure you don't copy the following files / folders.
cordova_plugins.js, cordova-js-src, cordova.js, plugins.
It seems like you have copied the push plugin for android in iOS project.