[TIMOB-25973] Android: Unknown error when packaging modules
GitHub Issue | n/a |
Type | Bug |
Priority | n/a |
Status | Open |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android |
Labels | engSchedule |
Reporter | Daniel Falcon |
Assignee | Joshua Quick |
Created | 2018-01-17T08:39:36.000+0000 |
Updated | 2019-09-24T15:46:08.000+0000 |
Description
Whenever you create a new module, after the first compilation it will show an error. However, the error is only shown on the main icon of the Project Explorer, but not in the rest of the project, making difficult or impossible to know what happened
To reproduce, just create a new module for Android with Ti SDK 7.0.1 and compile without modifying anything.
Attachments
Hello [~dfalcon], Thanks for sharing with us. Which version of ndk you are using? It would be be better if you can share the error logs here. Best
Hi Mostafizur Rahman, I'm using android-ndk-r15b. The curious thing... is that there is no error log. The Appc. Studio tells you that there is an error, and if you want to continue anyway. After that the module just compiles and works most of the time.
Hey Daniel, does this also occur when building through the CLI (appc run -p android --build-only) ? Also, if possible, can you confidentially share the module source in case it's not OSS?
Sorry for the late answer. This is what I did: 1. In Appcelerator Studio: File > New > Mobile Module Project. 2. Entered "testbuild" as project name. Entered "test.build" as module ID. Selected 7.0.1.GA as SDK version. Deployment target: Android. 3. Did not fill any parameter for the manifest file, just pressed "Next >" 4. Install platforms I have the Latest installed version: 8.1.0. Just pressed "Finish" -- 5. Right clicked on the module, Publish > Package - Android Module 6. Selected my modules location and pressed "Finish". 7. No errors in compiling, the module packaged successfully. -- 8. Now, in my project list, the project appears to be wrong. !screenshot-1.png|thumbnail! You can do this by yourselves, just by creating a new module and compiling without modifying anything, but just in case, I've uploaded the source of the project. [^testbuild.zip]
This looks like a Studio issue then. Can you expand the project to see where exactly the error is located at?
Hi Hans, Yeah, this is what the project looks like when opened (as you can see only a warning on bootstrap.js file) !screenshot-2.png|thumbnail! This is the warning line in bootstrap.js !screenshot-3.png|thumbnail! So, apparently there are no errors in there, but the main project is shown as it has any error. In fact, after the first packaging, if you try to package again, this popup appears: !screenshot-4.png|thumbnail!
[~dfalcon] I took the same module project and imported into my workspace and built it - it doesn't show any error while building for the second time. To understand more about the issue, can you check the exact error message which is shown on the project. Please follow this. 1. Open "Problems" View: Go to "Window" Menu -> Show View -> Other -> General -> Select "Problems" -> Click on "Open" 2. Now the project error will be shown in the Problem View Please add the error message to the ticket.
Hi Kondal, I did as suggested and found out this: Description: Project 'testbuild' is missing required source folder: 'android/build/.apt_generated' Resource: testbuild Path: Location: Build path Type: Build Path Problem Description: The project cannot be built until build path errors are resolved Resource: testbuild Location: Unknown Type: Java Problem Do this tell you something? Please do note that this is happening since the update from SDK 6.3.0 to SDK 7.0.0 (still happening in 7.0.1). Thanks.
[~hknoechel] [~gmathews] I think you guys are the experts in this area. Here is the actual error.
[~dfalcon] Can you check this https://stackoverflow.com/questions/9595486/what-is-.apt_generated-folder-in-web-project This folder is created if and only if you have "Annotation Processing" enabled on the project. See Project Properties > Java Compiler > Annotation Processing. Make sure none of them enabled for error here.
Hi Kondal, Tried unchecking the Annotation Processing and almost everything else in there. After re-building, cleaning project, restarting studio, etc., the problem is still there. This error is not a critical thing... but annoying.
Here is the quick workaround to remove the error from the project:
Right-click on the project
Select "Properties"
Select "Java Build Path" from the right side tree
Select "Source" tab
Select "/android/build/.apt_generated(missing)" entry from the list
Click on the "Remove" button
Alternatively, you can also remove the below entry from the.classpath
file to resolve the error