add some tag to android gradle file

瀏覽次數:27 次
跳到第一則未讀訊息

Fuad Nassar

未讀,
2019年2月26日 上午9:21:042019/2/26
收件者: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

未讀,
2019年2月26日 晚上9:55:582019/2/26
收件者: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

未讀,
2019年2月27日 凌晨2:26:342019/2/27
收件者: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

未讀,
2019年2月27日 晚上10:10:442019/2/27
收件者: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

未讀,
2019年3月2日 清晨6:54:562019/3/2
收件者: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

未讀,
2019年3月2日 清晨7:00:332019/3/2
收件者:CodenameOne Discussions
erorr file
error (22).txt

Shai Almog

未讀,
2019年3月2日 晚上11:03:192019/3/2
收件者: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.
回覆所有人
回覆作者
轉寄
0 則新訊息