I'm trying to build React Native locally. I followed the Facebook instructions from Building React Native from source
but when I do the command react-native run-android, I receive the following error:
:ReactAndroid:downloadBoost
Invalid cookie header: "Set-Cookie: sf_mirror_attempt="boost:iweb:boost/1.57.0/boost_1_57_0.zip"; expires=120; Path=/". Invalid 'expires' attribute: 120
:ReactAndroid:downloadBoost FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':ReactAndroid:downloadBoost'.
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Any ideas as to what I may have done wrong?
The problem is that your computer is not able to download boost_1_57_0.zip file with the https path that is in your settings (invalid certificate).
Go to your project's project_root/node_modules/react-native/ReactAndroid/build.gradle file and change the src attribute on the task downloadBoost part to any proxy that you find to boost_1_57_0.zip and it should work.
I received a similar error and the error went away after using the correct Android NDK (currently android-ndk-r10e). But if you've followed the instructions, as you've said, then that is most likely not your problem.
Related
I'm trying to build in production mode my flutter app for web, but I have my "main.dart" file not in the root lib directory, this cause to not be able to build my app for web, I have tried to point the path to where the "main.dart" file is, like:
flutter build web path/to/my/main/file/main.dart --release
But ended out with an error message like:
💪 Building with sound null safety 💪
Compiling lib/main.dart for the Web...
Target dart2js failed: Exception: .dart_tool/flutter_build/72a548668e340c281af31f7867ace19b/main.dart:8:8:
Error: Error when reading 'lib/main.dart': Error reading 'lib/main.dart' (No such file or directory)
import 'package:the_movie_db_app/main.dart' as entrypoint;
^
.dart_tool/flutter_build/72a548668e340c281af31f7867ace19b/main.dart:13:14:
Error: Method not found: 'main'.
entrypoint.main();
^^^^
Error: Compilation failed.
This command works when you try to build an APK, but not to build a flutter web app.
Can somebody please tell me how to solve this?
add -t before your main.dart path.
eg.
flutter build web -t lib/main-dev.dart
I'm tired of getting this error every third/fourth time I try to build project:
ERROR: Unable to resolve dependency for ':app#debug/compileClasspath': Could not resolve androidx.fragment:fragment:[1.2.0].
Show Details
Affected Modules: app
It also effects ':app#debugUnitTest/compileClasspath' and ':app#debugAndroidTest/compileClasspath' (shows the same error for them).
Also sometimes it goes after the following build error (internet connection is surely stable):
Unknown host 'repo.maven.apache.org: nodename nor servname provided, or not known'. You may need to adjust the proxy settings in Gradle.
Enable Gradle 'offline mode' and sync project
Learn about configuring HTTP proxies in Gradle
There were no changes in build.gradle files or any other gradle files before this error came.
It would be nice if you help to get rid of it. Gradle-plugin version = "1.3.71".
I have a new windows 8.1 machine, and am trying to get my android IDE environment installed. But there seems to be some issues that i have never encountered before. my existing projects are not compiling because the system can not find or even download the proper play services libs..
Error:A problem occurred configuring project ':mobile'.
Could not resolve all dependencies for configuration ':mobile:_debugCompile'.
A problem occurred configuring project ':wear'.
Could not resolve all dependencies for configuration ':wear:_debugCompile'.
Could not find com.google.android.gms:play-services-wearable:7.0.0.
Searched in the following locations:
https://jcenter.bintray.com/com/google/android/gms/play-services-wearable/7.0.0/play-services-wearable-7.0.0.pom
https://jcenter.bintray.com/com/google/android/gms/play-services-wearable/7.0.0/play-services-wearable-7.0.0.jar
file:/C:/Users/Erik/AppData/Local/Android/sdk/extras/android/m2repository/com/google/android/gms/play-services-wearable/7.0.0/play-services-wearable-7.0.0.pom
file:/C:/Users/Erik/AppData/Local/Android/sdk/extras/android/m2repository/com/google/android/gms/play-services-wearable/7.0.0/play-services-wearable-7.0.0.jar
file:/C:/Users/Erik/AppData/Local/Android/sdk/extras/google/m2repository/com/google/android/gms/play-services-wearable/7.0.0/play-services-wearable-7.0.0.pom
file:/C:/Users/Erik/AppData/Local/Android/sdk/extras/google/m2repository/com/google/android/gms/play-services-wearable/7.0.0/play-services-wearable-7.0.0.jar
Required by:
AndroidClickDogTrainer:wear:unspecified
So i tried using the SDK manager to insure i had the proper play services but
I keep getting the following error from my SDK manager in Android Studio on my Windows 8.1 machine.
This is a clean install, and i thought it may be my firewall settings but after turning off my firewall completely it is still happening:
Refresh Sources: Fetched Add-ons List successfully Refresh Sources
Failed to fetch URL
https://dl.google.com/android/repository/addon.xml, reason: File not
found Failed to fetch URL
https://dl.google.com/android/repository/sys-img/android-wear/sys-img.xml,
reason: File not found Failed to fetch URL
https://dl.google.com/android/repository/sys-img/google_apis/sys-img.xml,
reason: File not found Failed to fetch URL
https://dl.google.com/android/repository/sys-img/x86/addon-x86.xml/addon.xml,
reason: File not found Refresh Sources: Failed to fetch URL
https://dl.google.com/android/repository/addon.xml, reason: File not
found Failed to fetch URL
https://dl.google.com/android/repository/sys-img/android-wear/sys-img.xml,
reason: File not found Failed to fetch URL
https://dl.google.com/android/repository/sys-img/google_apis/sys-img.xml,
reason: File not found Failed to fetch URL
https://dl.google.com/android/repository/sys-img/x86/addon-x86.xml/addon.xml,
reason: File not found Ignoring unknown package filter
'extra-google-m2repository'Warning: The package filter removed all
packages. There is nothing to install.
Please consider trying to update again without a package filter.
No matter what i do.. TURN OFF FIRE WALL, RUN AS ADMIN.. etc etc.. it just won't install the play services libs..
please help
So I searched high and low for an answer to this, and it seems a lot of people are having this and similar issues and creating really cumbersome workarounds that include everything from re-writing parts of the android.bat file to uninstalling the SDK and re-installing it from scratch.. for me none of those solutions worked.. but what seems to have fixed the problem was actually quite simple.
hope this helps others..
open the Android SDK Manager.. click on TOOLS>Options and check "Force https://.. sources to be fetched using http://.."
For 2 days, I have been trying to fix my Android Studio setup, but despite a lot of googling have had no luck fixing this problem. Gradle keeps giving me the error
Error:Execution failed for task ':Android-Tabbedout-30:processQaReleaseResources'.
Error: A library uses the same package as this project
You can temporarily disable this error with android.enforceUniquePackageName=false
However, this is temporary and will be enforced in 1.0
If I add in the enforceUniquePackageName=false to the gradle file, then the project can be successively refreshed by Gradle, but once I try to run it I get this error:
Error Code:
2
Output:
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define
Any ideas on how to fix this?
I was searching for that same problem and i find this on github
https://github.com/DWorkS/AStickyHeader/issues/12
And this solved my problem.
All this says is to rename the package name on the AndroidManifast.xml file.
And its done.
When building a blackberry10 cordova/phonegap project, a number of files are not included in the build. A number of splash screen images and the file "DEFAULT_BAR_NAME.bar" are not included.
However, if the same process is repeated on another device (desktop PC) all files are included. As far as I can tell, both have identical software setups.
C:\Users\USER\hello>cordova emulate blackberry10
[Error: An error occurred while emulating/deploying the blackberry10 project.
[BUILD] Populating application source
[BUILD] Parsing config.xml
[BUILD] Generating output files
[WARN] Failed to find debug token. If you have an existing debug token, please copy it to %HOME%/.cordova/blackberry10debugtoken.bar. To generate a new debug token, execute the 'run' command.
[ERROR] Error: Attribute image: file cannot be found in the list of packaged files: res/screen/blackberry/splash-1280x768.png
[ERROR] Native Packager exception occurred
[WARN] Failed to find debug token. If you have an existing debug token, please copy it to %HOME%/.cordova/blackberry10debugtoken.bar. To generate a new debug token, execute the 'run' command.
[ERROR] Error: Attribute image: file cannot be found in the list of packaged files: res/screen/blackberry/splash-1280x768.png
[ERROR] Native Packager exception occurred
[ERROR] Error: File does not exist or not a file or cannot read: C:\Users\USER\hello\PLATFO~1\BLACKB~1\build\simulator\DEFAULT_BAR_NAME.bar
If any more information will help then please ask, thanks!
I saw this message a bit late.
But I have a solution for this problem.
Browse to the root of your phonegap project (the one containing these folders merges,platforms,www & plugins)
Open the www folder
Open config.xml
Now carefully remove all the declarations for splash and icon for those platforms those are not added using cordova platform add command. For e.g if you have created a project only for blackberry remove all the icon and splash declarations for ios, android, webos, bada, windows-phone
Now run cordova build. Your blackberry app should be built without any errors.
I was able to compile my blackberry 10 app in phonegap 3.3
If you face any errors regarding p12 file then you need to follow the blackberry signing guidelines. Or if you got any doubts then mail me
hansolo.amey#gmail.com