add some tag to android gradle file

27 views
Skip to first unread message

Fuad Nassar

unread,
Feb 26, 2019, 9:21:04 AM2/26/19
to CodenameOne Discussions
hi,

how I can add those tags to the Gradle file? 


dependencies
{
implementation "com.github.parse-community.Parse-SDK-Android:parse:1.19.0"
}
 repositories
{
     
mavenCentral()
     
jcenter()
     
maven { url 'https://jitpack.io' }
  }

 
I tried to add these hints, but the app was failed in cn1 server


android
.gradleDep=implementation 'com.github.parse-community.Parse-SDK-Android:parse:1.19.0';
android.repositories=mavenCentral()jcenter()maven { url 'https://jitpack.io' };





Shai Almog

unread,
Feb 26, 2019, 9:55:58 PM2/26/19
to CodenameOne Discussions
Hi,
I'll need the error log to help. You can usually see the resulting manifest and tune it accordingly. 
I think this might work better:
 android.repositories=mavenCentral(); jcenter(); maven { url 'https://jitpack.io' };

Fuad Nassar

unread,
Feb 27, 2019, 2:26:34 AM2/27/19
to CodenameOne Discussions

    after reading the doc for above dep & repo I see this note 

   "This tutorial uses a basic app created in Android Studio 3.2 with Compile SDK Version = 27 and targetSdkVersion 27" 

 I tried agine to added those hints:


android.buildToolsVersion=27
android.targetSDKVersion=27
android.gradleDep=implementation 'com.github.parse-community.Parse-SDK-Android:parse:1.19.0';
android.repositories=mavenCentral(); jcenter(); maven { url 'https://jitpack.io' };





 
but the same problem
error (9).txt

Shai Almog

unread,
Feb 27, 2019, 10:10:44 PM2/27/19
to CodenameOne Discussions
You can look through that file and see the generated manifest. Notice this from the output:

repositories {
    jcenter()
    mavenCentral()
     jcenter()
     maven { url 'https://jitpack.io' }
     mavenLocal()
      mavenCentral()
      google()
    flatDir{
              dirs 'libs'
       }
}

Most of the repos there are already present so you only need to add some of them.

The actual error is:
/tmp/build4457111464099468165xxx/MainClass/build/intermediates/manifests/full/release/AndroidManifest.xml:42: AAPT: No resource identifier found for attribute 'appComponentFactory' in package 'android' /tmp/build4457111464099468165xxx/MainClass/build/intermediates/manifests/full/release/AndroidManifest.xml:42: error: No resource identifier found for attribute 'appComponentFactory' in package 'android'

I'm not sure what triggered these failures. I was able to find this while googling that specific error and it included some suggestions:
https://stackoverflow.com/questions/50266035/no-resource-identifier-found-for-attribute-appcomponentfactory-in-package-and/51170620

(Notice that these sort of things are fragile as Androids build system/supporting libraries are "dependency hell")

Try adding the build hint:
android.supportv4Dep=compile 'com.android.support:support-v4:27.1'; implementation 'com.android.support:appcompat-v7:27.1';

This should match the suggestion of the first answer there. It isn't ideal as you might fail again when we need to move to API
level 28/29 as required by google.

Fuad Nassar

unread,
Mar 2, 2019, 6:54:56 AM3/2/19
to CodenameOne Discussions

not working, really i started to feel that there's issues under this topic because i read the dvanced-topics and under Gradle Dependencies section i see that you added these hints as an example 

android.gradleDep=compile 'io.intercom.android:intercom-sdk:3.+'
android
.playServices=9.8.0
android
.sdkVersion=25

 i tried to add same these hints with a clean project but build failed again 

Fuad Nassar

unread,
Mar 2, 2019, 7:00:33 AM3/2/19
to CodenameOne Discussions
erorr file
error (22).txt

Shai Almog

unread,
Mar 2, 2019, 11:03:19 PM3/2/19
to CodenameOne Discussions
There is no need for those build hints since the default target is already 27. You can't target older versions as google no longer accepts anything below 26 and will soon require 27.
Reply all
Reply to author
Forward
0 new messages