Failed to build project that pull appcompact dependencies, but not say why

I’m triying to integrate a external library, and then in a empty Copper project I set

<ItemGroup>
    <Reference Include="android" />
    <Reference Include="swift">
      <Private>True</Private>
    </Reference>
    <Reference Include="cooper">
      <Private>True</Private>
    </Reference>
    <Reference Include="elements">
      <Private>True</Private>
    </Reference>
    <GradleRepository Include="https://jitpack.io" />
    <GradleRepository Include="https://maven.google.com/" />
    <GradleReference Include="com.github.vic797:prowebview:*" />    
  </ItemGroup>

Now, the build fail (after clean) with no clear reason. I get:

/Applications/Fire.app/Contents/Resources/Mono/bin/mono /Applications/Fire.app/Contents/Resources/EBuild.exe "--setting:Elements:ToffeeSDKFolder=/Applications/Fire.app/Contents/Resources/Toffee SDKs" "--setting:Elements:ReferencePathsXMLFolder=/Applications/Fire.app/Contents/Resources/Reference Paths with Data Abstract Trial" --setting:Elements:IslandLddExePath=/Applications/Fire.app/Contents/Resources/lld --setting:Elements:ToffeeHelperExePath=/Applications/Fire.app/Contents/Resources/ToffeeHelper /Users/mamcx/Projects/FireApp/FireApp.sln --logger:fire --configuration:Debug --verbosity:normal --xml:/var/folders/qg/ss62fv7x5kl7tcf9r_4dntp40000gn/T/FireApp.fire.temp.sln.xml --build --setting:TreatFixableErrorsAsWarnings=True
RemObjects EBuild. An open source build engine for Elements and beyond.
Copyright RemObjects Software 2016-2018. All Rights Reserved. Created by marc hoffman.
Version 10.0.0.2273 (develop) built on talax, 20180409-195232. Commit d85135f.

A lot of

H: aapt: removing attribute http://schemas.android.com/apk/res/android:layout_marginEnd from <ImageView> [/Users/mamcx/Library/Application Support/RemObjects Software/EBuild/Obj/FireApp-BC416B45DC42D4121907EB4853E19FEACAE79038/Debug/Cooper-Android/aar/appcompat-v7-27.1.1/res/layout/abc_action_mode_close_item_material.xml (17)]
H: aapt: removing attribute http://schemas.android.com/apk/res/android:paddingStart from <ImageView> [/Users/mamcx/Library/Application Support/RemObjects Software/EBuild/Obj/FireApp-BC416B45DC42D4121907EB4853E19FEACAE79038/Debug/Cooper-Android/aar/appcompat-v7-27.1.1/res/layout/abc_action_mode_close_item_material.xml (17)]
H: aapt: using v17 attributes; synthesizing resource org.me.fireapp:layout/abc_action_mode_close_item_material for configuration v17.


And finally

   Project 'FireApp' failed to build.
   Solution 'RemObjects.EBuild.BuildSolution' failed to build.

My only hint is in the toolbar that say:

“Last build failed on AndroidPack (176 hints)”

P.D: BTW, if appcompact-v7 is referenced it say the library is not found. Is necesary to manually set the https://maven.google.com/.

can you send me the project or a testcase that shows this? sounds like aapt fails, but we somehow dont parse the error out of its output correctly. a Detailed build log miyht gge you a better indication what it fails on

that should be in the local Extras folder, if installedprperly in SDK manager. but i’ll look at adding that repo as a default, tomorrow.

I just create a new android app. Then add the gradle repository and reference then build.

I just repeat the procedure and it happened again.

I also try with other libraries like React Native with the same results:

<GradleReference Include="com.facebook.react:react-native" />

The problem is clearly on the androidpack.

BTW: Is possible to call a Pre/post build step like calling gradle so I solve things there and pull the jars to fire?

Fails for me with

D: Checking <MavenRepository https://maven.google.com/>
Package metadata could not be loaded from ‘https://maven.google.com/com/android/support/support-annotations/maven-metadata.xml’.
E: The request timed out

which is indeed what happens — there request does hang for 30s and then times out.

I see that too several times (I don’t mention it because I assume was my internet problem), but when it work happen what I report here.

This also happen if I build a JAR (with android studio and a empty class) with the dependencies and reference it from Fire:

apply plugin: 'com.android.library'

android {
    compileSdkVersion 27

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    defaultConfig {
        minSdkVersion 21
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

}

task clearJar(type: Delete) {
    delete 'build/outputs/droidui.jar'
}

task makeJar(type: Copy) {
    from('build/intermediates/bundles/release/')
    into('build/outputs/')
    include('classes.jar')
    rename ('classes.jar', 'droidui.jar')
}

makeJar.dependsOn(clearJar, build)

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])

    implementation 'com.android.support:appcompat-v7:27.1.1'
    compile 'co.trikita:anvil-sdk21:0.5.1'
}
<Reference Include="droidui-release.aar">
  <HintPath>..\BestDroid\droidui\build\outputs\aar\droidui-release.aar</HintPath>
  <Private>True</Private>
</Reference>

?? okay… so it also fails in ADS, or what are you saying?

No, I’m saying that I build a JAR on ADS and then refer to the local JAR.

ok. can you send me a tets case with your Elements project and the local jar?

Ok, I send both projects (fire and ADS).

Archive.zip (7.7 MB)

Any update on this? Without the ability to import external jars I must rule out fire for now, but I wish not.

Thanks, logged as bugs://80173

My apologies, I lost track of this one. This looks like a compiler issue, I’ve logged a bug and will ask the team to have a look ASAP (possibly for Friday’s build, if not, I’ll try to shoot you one sometime early next week).

bugs://80173 got closed with status fixed.

Ok, now I get a error:

E: dex: java.lang.IllegalArgumentException: already added: Landroid/arch/lifecycle/LifecycleRegistry;
E: dex: java.lang.IllegalArgumentException: already added: Landroid/arch/lifecycle/LifecycleRegistry$1;
E: dex: java.lang.IllegalArgumentException: already added: Landroid/arch/lifecycle/LifecycleRegistry$ObserverWithState;
E: dex: java.lang.IllegalArgumentException: already added: Landroid/arch/lifecycle/LifecycleRegistryOwner;
E: dex: java.lang.IllegalArgumentException: already added: Landroid/arch/lifecycle/ReportFragment;
E: dex: java.lang.IllegalArgumentException: already added: Landroid/arch/lifecycle/ReportFragment$ActivityInitializationListener;
E: dex: java.lang.IllegalArgumentException: already added: Lcom/facebook/soloader/ApkSoSource;
E: dex: java.lang.IllegalArgumentException: already added: Lcom/facebook/soloader/DirectorySoSource;
E: dex: java.lang.IllegalArgumentException: already added: Lcom/facebook/soloader/Elf32_Dyn;
E: dex: 

This happened with both react native and prowebview

That’s with .2285 or .2287? if the latter, can I get a new testcase, coz your previous one builds fine for me in 2287, which does have some fixes for DEX.

Is with .2287.

Version 10.0.0.2287 (develop) built on talax, 20180518-125135. Commit d8f49b9.

I don’t anything else as with the test here. ie I setup the same project.

Maybe SDK versions?

   Android SDK found in '/Users/mamcx/Library/android-sdk'.
   Android Build Tools found in '/Users/mamcx/Library/android-sdk/build-tools/27.0.3'.
   Android ApkBuilder found in '/Users/mamcx/Library/android-sdk/tools/lib/sdklib-26.0.0-dev.jar:/Users/mamcx/Library/android-sdk/tools/lib/sdk-common-26.0.0-dev.jar:/Users/mamcx/Library/android-sdk/tools/lib/common-26.0.0-dev.jar'.
   No exact platform version was specified for target 'Cooper-Android', using android-27.

Oh: iirc what I had to do with your project set a Minimum Android SDK version of 26. But I was getting an explicit error message from DEX that stated that one of the libraries used a feature that required it…