Tell us which versions you are using:
Clean Build
..\android\app\src\main\java\com\perkloanapp\MainApplication.java:6: error: cannot find symbol
import com.reactnative.ivpusic.imagepicker.PickerPackage;
^
symbol: class PickerPackage
location: package com.reactnative.ivpusic.imagepicker
..\android\app\src\main\java\com\perkloanapp\MainApplication.java:30: error: cannot find symbol
new PickerPackage(),
^
symbol: class PickerPackage
2 errors
:app:compileDebugJavaWithJavac FAILED
FAILURE: Build failed with an exception.
What I did to get my project to compile is the following:
Add import com.reactnative.ivpusic.imagepicker.PickerPackage; to the top of your Android/app/src/main/java/com/{project name}/MainApplication.java file (if it's not already there), like so,
...
import com.reactnative.ivpusic.imagepicker.PickerPackage;
import java.util.Arrays;
import java.util.List;
...
public class MainApplication extends Application implements ReactApplication {...}
*Disclaimer: Even though my project compiled after doing this, I ran into the error described in #794 *
My (android/app)build.gradle file has this
dependencies {
compile project(':react-native-image-crop-picker')
compile project(':amazon-cognito-identity-js')
compile project(':react-native-fetch-blob')
compile project(':react-native-vector-icons')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:25.0.0"
compile "com.facebook.react:react-native:+" // From node_modules
}
/android/app/src/main/java/com/{projectName}/MainApplication.java file has this...
package com.perkloanapp;
import android.app.Application;
import com.facebook.react.ReactApplication;
import com.reactnative.ivpusic.imagepicker.PickerPackage;
import com.amazonaws.RNAWSCognitoPackage;
import com.RNFetchBlob.RNFetchBlobPackage;
import com.oblador.vectoricons.VectorIconsPackage;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
import com.facebook.soloader.SoLoader;
import java.util.Arrays;
import java.util.List;
*My Question is: Where should the package be? - com.reactnative.ivpusic.imagepicker.PickerPackage; *
My solution
I cannot exactly say what worked, but, here is what I did to resolve this...
What I did to get my project to compile is the following:
Addimport com.reactnative.ivpusic.imagepicker.PickerPackage;to the top of your Android/app/src/main/java/com/{project name}/MainApplication.java file (if it's not already there), like so,
...
import com.reactnative.ivpusic.imagepicker.PickerPackage;
import java.util.Arrays;
import java.util.List;
...
public class MainApplication extends Application implements ReactApplication {...}*Disclaimer: Even though my project compiled after doing this, I ran into the error described in #794 *
Saved my life. Thank you
Adding
implementation project(path: ':react-native-image-crop-picker')
in build.gradle file fixes for me. This line is not provided on their documentation
Most helpful comment
What I did to get my project to compile is the following:
Add
import com.reactnative.ivpusic.imagepicker.PickerPackage;to the top of your Android/app/src/main/java/com/{project name}/MainApplication.java file (if it's not already there), like so,...import com.reactnative.ivpusic.imagepicker.PickerPackage;import java.util.Arrays;import java.util.List;...public class MainApplication extends Application implements ReactApplication {...}*Disclaimer: Even though my project compiled after doing this, I ran into the error described in #794 *