New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A problem occurred configuring project ':app' #6282
Comments
This comment was marked as abuse.
This comment was marked as abuse.
I tried it like this Luke@Luke-PC MINGW64 ~/Documents/MobileProjects/HelloWorld Luke@Luke-PC MINGW64 ~/Documents/MobileProjects/HelloWorld No success! |
Hi @nobleson,
Then the Hope this helps. |
@tsonevn , C:\Windows\system32>cd %ANDROID_HOME%/tools/bin C:\Android\tools\bin>sdkmanager.bat --licenses In its first form, installs, or uninstalls, or updates packages. Common Arguments:
C:\Android\tools\bin>I can start the sdkmanager gui from command line via android. All the listed packages, i have accepted the license via sdkmanager gui before doing the installations |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
-OS: Windows 7 64.bit (AMD)
STEP !: I created a blank template HelloWorld Project:
tns create HelloWorld --template tns-template-blank-ng
....
Removing after-createProject...
Project HelloWorld was successfully created.
Now you can navigate to your project with $ cd HelloWorld
After that you can run it on device/emulator by executing $ tns run
STEP2: I navigate into HelloWorld and run tns doctor
C:\Users\Luke\Documents\MobileProjects\HelloWorld>tns doctor
√ Getting environment information
No issues were detected.
C:\Users\Luke\Documents\MobileProjects\HelloWorld>tns doctor
√ Getting environment information
No issues were detected.
√ Your ANDROID_HOME environment variable is set and points to correct directory.
√ Your adb from the Android SDK is correctly installed.
√ The Android SDK is installed.
√ A compatible Android SDK for compilation is found.
√ Javac is installed and is configured properly.
√ The Java Development Kit (JDK) is installed and is configured properly.
√ Local builds for iOS can be executed only on a macOS system. To build for iOS on a different operating system, you can use the NativeScript cloud infrastructure.
√ Getting NativeScript components versions information...
‼ Update available for component nativescript. Your current version is 4.2.3 and the latest available version is 4.2.4.
√ Component tns-core-modules has 4.2.1 version and is up to date.
√ Component tns-android has 4.2.0 version and is up to date.
√ Component tns-ios has 4.2.0 version and is up to date.
STEP 4: I run the project with and increase timeout of 300
C:\Users\Luke\Documents\MobileProjects\HelloWorld>tns run android --timeout 300
Skipping node_modules folder! Use the syncAllFiles option to sync files from this folder.
Searching for devices...
npm WARN extract-text-webpack-plugin@3.0.2 requires a peer of webpack@^3.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
added 21 packages in 88.201s
Executing before-liveSync hook from C:\Users\Luke\Documents\MobileProjects\HelloWorld\hooks\before-liveSync\nativescript-angular-sync.js
Executing before-watchPatterns hook from C:\Users\Luke\Documents\MobileProjects\HelloWorld\hooks\before-watchPatterns\nativescript-dev-typescript.js
Executing before-watchPatterns hook from C:\Users\Luke\Documents\MobileProjects\HelloWorld\hooks\before-watchPatterns\nativescript-dev-webpack.js
Executing before-watch hook from C:\Users\Luke\Documents\MobileProjects\HelloWorld\hooks\before-watch\nativescript-dev-typescript.js
Found peer TypeScript 2.7.2
Executing before-watch hook from C:\Users\Luke\Documents\MobileProjects\HelloWorld\hooks\before-watch\nativescript-dev-webpack.js
Copying template files...
Platform android successfully added. v4.2.0
Executing before-shouldPrepare hook from C:\Users\Luke\Documents\MobileProjects\HelloWorld\hooks\before-shouldPrepare\nativescript-dev-webpack.js
Executing before-prepare hook from C:\Users\Luke\Documents\MobileProjects\HelloWorld\hooks\before-prepare\nativescript-dev-typescript.js
Hook skipped because either bundling or livesync is in progress.
Preparing project...
Executing before-prepareJSApp hook from C:\Users\Luke\Documents\MobileProjects\HelloWorld\hooks\before-prepareJSApp\nativescript-dev-webpack.js
Successfully prepared plugin nativescript-angular for android.
Successfully prepared plugin nativescript-theme-core for android.
Successfully prepared plugin tns-core-modules for android.
Successfully prepared plugin nativescript-intl for android.
Successfully prepared plugin tns-core-modules-widgets for android.
Project successfully prepared (Android)
Executing after-prepare hook from C:\Users\Luke\Documents\MobileProjects\HelloWorld\hooks\after-prepare\nativescript-dev-webpack.js
Building project...
Gradle build...
+ setting applicationId
+ applying user-defined configuration from C:\Users\Luke\Documents\MobileProjects\HelloWorld\App_Resources\Android\app.gradle
+ adding nativescript runtime package dependency: nativescript-optimized-with-inspector
+ adding aar plugin dependency: C:\Users\Luke\Documents\MobileProjects\HelloWorld\node_modules\tns-core-modules-widgets\platforms\android\widgets-release.aar
Checking the license for package Android SDK Build-Tools 27.0.3 in C:\Android\licenses
Warning: License for package Android SDK Build-Tools 27.0.3 not accepted.
Checking the license for package Android SDK Platform 22 in C:\Android\licenses
Warning: License for package Android SDK Platform 22 not accepted.
FAILURE: Build failed with an exception.
A problem occurred configuring project ':app'.
Using Android SDK: C:\Android
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
BUILD FAILED in 2m 44s
Unable to apply changes on device: emulator-5554. Error is: Command gradlew.bat failed with exit code 1.
Executing after-watch hook from C:\Users\Luke\Documents\MobileProjects\HelloWorld\hooks\after-watch\nativescript-dev-typescript.js
Stopping tsc watch
Executing after-watch hook from C:\Users\Luke\Documents\MobileProjects\HelloWorld\hooks\after-watch\nativescript-dev-webpack.js
Executing after-watch hook from C:\Users\Luke\Documents\MobileProjects\HelloWorld\hooks\after-watch\nativescript-dev-typescript.js
Executing after-watch hook from C:\Users\Luke\Documents\MobileProjects\HelloWorld\hooks\after-watch\nativescript-dev-webpack.js
From the last error it shows that
Warning: License for package Android SDK Build-Tools 27.0.3 not accepted.
Warning: License for package Android SDK Platform 22 not accepted.
I have installed the SDK Build-Tools 27.0.3 View it here
I have updated the Android SDK Platform to the latest. You can find it in the screenshot link
I also notice this in the Package.json;
"nativescript": {
"id": "org.nativescript.HelloWorld",
"tns-android": {
"version": "4.0.0"
},
"tns-ios": {
"version": "4.0.0"
}
},
My target platform is 5.1.1 (Android version) which i have already installed. So i tried to change the version from 4.2.0 to 5.1.1 still the application refused to run.
The android emulator settings are like this.
The CLI launch the emulator successfully but can not display.
I am following the offical documentation of NativeScript.
What can i do hence?
The text was updated successfully, but these errors were encountered: