I created a simple ionic app and when i try to build the android app using
ionic build android
I come across this error:
Parsing C:\Users\myuser\AppData\Local\Android\Sdk\tools\package.xml
Errors during XML parse:
javax.xml.bind.UnmarshalException
- with linked exception:
[java.net.MalformedURLException]
Additionally, the fallback loader failed to parse the XML.
Failed to download any source lists!
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Failed to find Build Tools revision 23.0.3
* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.
BUILD FAILED
My android SDK is fully installed.there is the SDK Manager:
Is there any idea what can be wrong? I'm using Windows 10 64-bit Operating System and all the environment variables is already set:
and
Related
I am getting issue after update all plugin in Phone Gap Projects in Android Platform from Android Studio.
when i am trying to build the app that time i am getting this issue, for details please check my attached image .
Issue is:
Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'android'.
Could not resolve all dependencies for configuration ':_debugApkCopy'.
Could not find com.google.firebase:firebase-messaging:11.0.1.
Required by:
project :
Could not find com.google.firebase:firebase-core:11.0.1.
Required by:
project :
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
enter image description here
i install react native and open a new project.
i try to run
react-native run-android
and I get this error
PS E:\Projects\React native\myapp> react-native run-android
Scanning 574 folders for symlinks in E:\Projects\React native\myapp\node_modules (27ms)
JS server already running.
Building and installing the app on the device (cd android && gradlew.bat installDebug)...
FAILURE: Build failed with an exception.
* Where:
Build file 'E:\⌠°σΘΘ≈ΦΘφ\⌠°σΘΘ≈ΦΘφ ≈Θ⌡\React native\myapp\android\app\build.gradle' line: 1
* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin [id 'com.android.application']
> Your project path contains non-ASCII characters. This will most likely cause the build to fail on Windows. Please move your project to a different directory. See http://b.android.com/95744 for details. This warning can be disabled by adding the line 'android.overridePathCheck=true' to gradle.properties file in the project directory.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 2.877 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
As you can see from the error you need to move your project to a different directory with no non-ASCII characters.
Your project path contains non-ASCII characters. This will most
likely cause the build to fail on Windows. Please move your project
to a different directory. See http://b.android.com/95744 for details
I am starting with hello world example to learn nativescript.
I am compiling and building code behind corporate explicit proxy. I am able to create project and add android platform in my project. but when i try to build the project I face below error.
D:\CurrentProjects\Android\NativeScript\simple>tns run android
Executing before-prepare hook from D:\CurrentProjects\Android\NativeScript\simpl
e\hooks\before-prepare\nativescript-dev-android-snapshot.js
Preparing project...
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'simple'.
Could not resolve all dependencies for configuration ':classpath'.
Could not download gradle-core.jar (com.android.tools.build:gradle-core:2.1
.2)
Could not get resource 'https://jcenter.bintray.com/com/android/tools/bu
ild/gradle-core/2.1.2/gradle-core-2.1.2.jar'.
Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gr
adle-core/2.1.2/gradle-core-2.1.2.jar'.
This is usually a temporary error during hostname resolution and m
eans that the local server did not receive a response from an authoritative serv
er (jcenter.bintray.com)
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
BUILD FAILED
Total time: 21.159 secs
Processing node_modules failed. Error: Command D:\CurrentProjects\Android\Native
Script\simple\platforms\android\gradlew.bat failed with exit code 1
Gradle is accessible from browser. But "tns build android" or "tns run android" couldn't download and give above proxy error. This seems gradle error but don't have answer in gradle as well.
UPDATE: when network guy removed proxy authentication check at his end, gradle compiled. I guess issue is gradle is not taking up proxy settings as mentioned in other answers on stackoverflow.
I am trying to run a the react-native app that was used at F8 locally. I am following the instructions here: http://makeitopen.com/tutorials/building-the-f8-app/local-setup/
I have everything work correctly (I can go to http://localhost:8080/dashboard/apps and http://localhost:8080/graphql and see data and run queries)
However, when I try to run the builds for iOS and Android, I am running into errors.
Android Error:
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/thisuser/f8app/android/app/build.gradle' line: 124
* What went wrong:
A problem occurred evaluating project ':app'.
> SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 1 mins 4.006 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
iOS Error:
=== BUILD TARGET CodePush OF PROJECT Pods WITH CONFIGURATION Debug ===
Check dependencies
** BUILD FAILED **
The following build commands failed:
CompileC /Users/thisuser/f8app/ios/build/Build/Intermediates/Pods.build/Debug-iphonesimulator/react-native-fbsdk.build/Objects-normal/x86_64/RCTConvert+FBSDKSharingContent.o /Users/thisuser/f8app/node_modules/react-native-fbsdk/iOS/RCTFBSDK/share/RCTConvert+FBSDKSharingContent.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Installing build/Build/Products/Debug-iphonesimulator/F8v2.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
/Users/thisuser/f8app/node_modules/react-native/node_modules/promise/lib/done.js:10
throw err;
^
Error: Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/F8v2.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
at checkExecSyncError (child_process.js:464:13)
at Object.execFileSync (child_process.js:484:13)
at _runIOS (/Users/thisuser/f8app/node_modules/react-native/local-cli/runIOS/runIOS.js:82:32)
at /Users/thisuser/f8app/node_modules/react-native/local-cli/runIOS/runIOS.js:24:5
at tryCallTwo (/Users/thisuser/f8app/node_modules/react-native/node_modules/promise/lib/core.js:45:5)
at doResolve (/Users/thisuser/f8app/node_modules/react-native/node_modules/promise/lib/core.js:200:13)
at new Promise (/Users/thisuser/f8app/node_modules/react-native/node_modules/promise/lib/core.js:66:3)
at Array.runIOS (/Users/thisuser/f8app/node_modules/react-native/local-cli/runIOS/runIOS.js:23:10)
at Object.run (/Users/thisuser/f8app/node_modules/react-native/local-cli/cliEntry.js:96:13)
at Object.<anonymous> (/usr/local/lib/node_modules/react-native-cli/index.js:88:7)
How do I make these work?
For android only
You will need to set Android SDK path like this and must have at least Android SDK Build-Tools Rev 23.0.1.
I'm trying out ionic for the first time. I have no issues with iOS, but building the demo app for Android gives me an error with virtually no information (see below). It seems likely to me that the issue is with the gradle config file that ships with Cordova, but I don't believe it's considered good practice with Cordova to edit the platform-specific files if you can avoid it.
[myApp]Bro? ionic build android
Running command: /Users/x/Documents/Dev/myApp/hooks/after_prepare/010_add_platform_class.js /Users/x/Documents/Dev/myApp
add to body class: platform-android
Running command: /Users/x/Documents/Dev/myApp/platforms/android/cordova/build
ANDROID_HOME=/Users/x/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home
Running: /Users/x/Documents/Dev/myApp/platforms/android/gradlew cdvBuildDebug -b /Users/x/Documents/Dev/myApp/platforms/android/build.gradle -Dorg.gradle.daemon=true
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> A problem occurred configuring project ':CordovaLib'.
> Failed to notify project evaluation listener.
> java.lang.ExceptionInInitializerError (no error message)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Looked at the stacktrace and it was clear that I had an issue with my Java XPath and XQuery libraries (Saxon). Turns out I hadn't updated that library since migrating from JDK 7 to JDK 8, and JDK 8 is not compatible with the version I had installed. Looks like the Android build uses the same plugin to parse the AndroidManifest.xml.
Short answer - look at your stack trace. Perhaps it also has to do with an outdated Java library.