Nativescript 8.6 build error while building for Android
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 24/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- android, javascript
- Lĩnh vực
- build-system, cli, mobile-dev
Hướng nghiên cứu
Bắt đầu với platforms/android/app/build.gradle được tạo ra, quanh dòng 589, và dependency @nativescript/android 8.6.2 trong package.json. Tái hiện Android build sạch bằng các phiên bản được liệt kê, sau đó xác định cấu hình build hoặc dependency gây ra vấn đề và kiểm tra rằng build thành công sau khi sửa lỗi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Issue Description
After upgrading my project from 6.x to 8.x I can no longer build for Android. I get the following error:
Build file '/Users/user/Documents/project/platforms/android/app/build.gradle' line: 589
A problem occurred configuring project ':app'.
entry
Command ./gradlew failed with exit code 1
the offending line is this:
// Discover all jars and dynamically create tasks for the extraction of each of them
project.ext.allJars = []
allprojects {
afterEvaluate { project ->
def buildType = project.selectedBuildType
def jars = []
def artifactType = Attribute.of('artifactType', String)
android.applicationVariants.all { variant ->
if (variant.buildType.name == buildType) {
variant.getCompileClasspath().each { fileDependency -> // THIS IS IT
processJar(fileDependency, jars)
}
}
}
}
}
Here is my package.json:
{
"scripts": {
"prepare-ios": "ns clean; ns prepare ios --release",
"postinstall": "cp patches/firebase/firebase-release.aar node_modules/@nativescript/firebase/platforms/android"
},
"main": "./app/app.ts",
"description": "NativeScript Application",
"license": "SEE LICENSE IN <your-license-filename>",
"repository": "<fill-your-repository-here>",
"dependencies": {
"@nativescript/core": "^8.6.2",
"@nativescript/email": "^2.0.5",
"@nativescript/fingerprint-auth": "^8.1.0",
"@nativescript/firebase": "^11.1.3",
"@nativescript/iqkeyboardmanager": "^2.0.0",
"@nativescript/local-notifications": "^6.0.0",
"@nativescript/theme": "^3.0.2",
"@nstudio/nativescript-loading-indicator": "^4.1.2",
"@triniwiz/nativescript-image-zoom": "^4.1.3",
"moment": "^2.29.4",
"moment-timezone": "^0.5.31",
"nativescript-exit": "^1.0.1",
"nativescript-numeric-keyboard": "^5.0.2",
"nativescript-pdf-view": "^3.0.0-1",
"nativescript-phone": "^3.0.3",
"nativescript-ui-calendar": "^14.2.1",
"nativescript-webview-utils": "^4.0.0"
},
"devDependencies": {
"@nativescript/android": "8.6.2",
"@nativescript/ios": "^8.6.3",
"@nativescript/types": "~8.6.1",
"@nativescript/webpack": "~5.0.18",
"@types/node": "^20.11.16",
"typescript": "~5.3.2"
},
"gitHead": "",
"readme": "NativeScript Application"
}
Here is the output from ns 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.
✔ Xcode is installed and is configured properly.
✔ xcodeproj is installed and is configured properly.
✔ CocoaPods are installed.
✔ CocoaPods update is not required.
✔ CocoaPods are configured properly.
✔ Your current CocoaPods version is newer than 1.0.0.
✔ Python installed and configured correctly.
✔ The Python 'six' package is found.
✔ Xcode version 15.2.0 satisfies minimum required version 10.
✔ Getting NativeScript components versions information...
✔ Component nativescript has 8.6.5 version and is up to date.
✔ Component @nativescript/core has 8.6.2 version and is up to date.
✔ Component @nativescript/ios has 8.6.3 version and is up to date.
✔ Component @nativescript/android has 8.6.2 version and is up to date.
I have been stuck on this for 2 days. Tried cleaning the project, playing around with different adnroid build tool versions, etc. Nothing had worked so far.
Any ideas on what is going on?
Reproduction
No response
Relevant log output (if applicable)
No response
Environment
No response
Please accept these terms
- I have searched the existing issues as well as StackOverflow and this has not been posted before
- This is a bug report
- I agree to follow this project's Code of Conduct
- Ngôn ngữ chính
- JavaScript
- Star
- 1.1k
- Fork
- 204
- Merge trung bình
- 1 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 8
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của NativeScript/nativescript-cli
-
in-progress
NativeScript/nativescript-cli#6140 · 2 bình luận · 1 người được giao ·
-
NativeScript/nativescript-cli#6090 · 1 người được giao ·
-
in progress
NativeScript/nativescript-cli#6015 · 1 reaction · 1 người được giao ·
-
question
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
NativeScript/nativescript-cli#5992 · 5 bình luận ·
-
feature-pending-triage
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
NativeScript/nativescript-cli#5975 ·
Tất cả issue của NativeScript/nativescript-cli
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
avniproject/avni-client#2135 ·
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
babalae/bettergi-scripts-list#3674 ·
-
A-Release-Notes C-Editing D-Modest S-Ready-For-Implementation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
bevyengine/bevy-website#2595 ·
-
ecosystem wording
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
matrix-org/matrix.org#3649 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
vadimdemedes/ink#1029 ·