Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25973] Android: Unknown error when packaging modules

GitHub Issuen/a
TypeBug
Priorityn/a
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
LabelsengSchedule
ReporterDaniel Falcon
AssigneeJoshua Quick
Created2018-01-17T08:39:36.000+0000
Updated2019-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

FileDateSize
screenshot-1.png2018-01-29T13:05:10.000+00001755
screenshot-2.png2018-01-29T13:21:09.000+000073904
screenshot-3.png2018-01-29T13:21:46.000+000011334
screenshot-4.png2018-01-29T13:23:28.000+000063900
screenshot-5.png2018-01-30T12:24:05.000+00008311
testbuild.zip2018-01-29T13:06:44.000+00005027558

Comments

  1. Mostafizur Rahman 2018-01-17

    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
  2. Daniel Falcon 2018-01-17

    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.
  3. Hans Knöchel 2018-01-17

    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?
  4. Daniel Falcon 2018-01-29

    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]
  5. Hans Knöchel 2018-01-29

    This looks like a Studio issue then. Can you expand the project to see where exactly the error is located at?
  6. Daniel Falcon 2018-01-29

    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!
  7. Kondal Kolipaka 2018-01-30

    [~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.
  8. Daniel Falcon 2018-01-30

    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.
  9. Kondal Kolipaka 2018-02-01

    [~hknoechel] [~gmathews] I think you guys are the experts in this area. Here is the actual error.
       Project 'testbuild' is missing required source folder: 'android/build/.apt_generated'
       
  10. Kondal Kolipaka 2018-02-08

    [~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.
  11. Daniel Falcon 2018-02-08

    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.
  12. Kondal Kolipaka 2018-04-18

    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
        <classpathentry kind="src" path="android/build/.apt_generated"/>
        

JSON Source