I've built Fresco and copied the created *.jar
packages into libs
folder that is placed in the root directory of ReactAndroid
project like the following:
directory setup:
- node_modules
- ReactAndroid
- libs
- drawee-1.3.0-sources.jar
- fbcore-1.3.0-sources.jar
- src
- main
- java
- libraries
- build.gradle
build.gradle
file:
...
dependencies {
...
compile (name:'drawee-1.3.0-sources', ext:'jar')
compile (name:'fbcore-1.3.0-sources', ext:'jar')
...
}
allprojects {
repositories {
flatDir {
dirs 'libs', './libs'
}
}
}
...
When trying to run the command of ./gradlew installDebug
it throws errors for the all classes that are added in *.jar
packages like the below:
/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIViewOperationQueue.java:13: error: package com.facebook.common.logging does not exist
import com.facebook.common.logging.FLog;
However FLog
class is present in fbcore-1.3.0-sources.jar
package.
(at com/facebook/common/logging/FLog.java path)
Is there any chance to overcome this issue?
Edit:
Using *.aar
packages instead of *.jar
has solved the issue.