If you create a custom activity more than once an exception should be thrown
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 52/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- android, java, javascript
- Lĩnh vực
- build-system, mobile-dev
Hướng nghiên cứu
Bắt đầu tại vị trí Generator.java được liên kết, quanh dòng 82, và theo dõi cách các extends trùng lặp cho com.tns.NativeScriptActivity được xử lý. Chạy bản tái hiện custom-activity đã được báo cáo bằng tns build android; được xem là hoàn tất khi phần mở rộng trùng lặp tạo ra exception như mong đợi thay vì chỉ ghi log cảnh báo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
- Create new project
- Try to extend the
com.tns.NativeScriptActivity, which is create by tns-core-modules
Code:
var MyCustomActivityClass = (function (_super) {
__extends(MyCustomActivityClass, _super);
function MyCustomActivityClass() {
_super.call(this);
return global.__native(this);
}
MyCustomActivityClass.prototype.onCreate = function (savedInstanceState) {
_super.prototype.onCreate.call(this, false ? savedInstanceState : null);
android.util.Log.d("Sbg.Test","we got called from onCreate of custom-activity.js");
};
MyCustomActivityClass = __decorate([
JavaProxy("com.tns.NativeScriptActivity")
], MyCustomActivityClass);
return MyCustomActivityClass;
}(android.app.Activity));
- Build the app for android
tns build android
Actual: A warning will be logged "Warning: there already is an extend called com.tns.NativeScriptActivity."
Expected: An exception to be thrown https://github.com/NativeScript/android-runtime/blob/2ab7271d12d56a03e57880a2b1783b08206363ae/test-app/build-tools/static-binding-generator/src/main/java/org/nativescript/staticbindinggenerator/Generator.java#L82
P.S. In some cases the exception is thrown, but this situations are very rare.
- Ngôn ngữ chính
- C++
- Star
- 563
- Fork
- 144
- Merge trung bình
- 10 giờ 46 phút
- Pull request đã merge (30 ngày)
- 14
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/android
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 38/100
NativeScript/android#2039 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
NativeScript/android#2024 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
NativeScript/android#2020 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 42/100
NativeScript/android#2019 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
NativeScript/android#1986 ·
Tất cả issue của NativeScript/android
Issue tương tự
-
ai_reviewed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
ydb-platform/ydb#53869 · 3 bình luận ·
-
bug cert blocker needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
project-chip/connectedhomeip#74373 ·
-
[request] tracy/0.14.1 Đang mởupstream update
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
conan-io/conan-center-index#31035 ·
-
Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
documentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
vllm-project/vllm-ascend#17329 ·