When I try to build on Android ionic cordova build android, it always return me with the following issue, seems that gradle is not able to source the picasso packages. I am using gradle, and even in Android studio I cannot make it work.
The error while building:
Task :app:compileDebugJavaWithJavac FAILED
/Users/yangliu/dev/qin-app-all/4.0.0/qin/platforms/android/app/src/main/java/com/sarriaroman/PhotoViewer/PhotoActivity.java:22: error: package com.squareup.picasso does not exist
import com.squareup.picasso.Callback;
^
/Users/yangliu/dev/qin-app-all/4.0.0/qin/platforms/android/app/src/main/java/com/sarriaroman/PhotoViewer/PhotoActivity.java:23: error: package com.squareup.picasso does not exist
import com.squareup.picasso.Picasso;
^
/Users/yangliu/dev/qin-app-all/4.0.0/qin/platforms/android/app/src/main/java/com/sarriaroman/PhotoViewer/PhotoActivity.java:24: error: package com.squareup.picasso does not exist
import com.squareup.picasso.RequestCreator;
^
/Users/yangliu/dev/qin-app-all/4.0.0/qin/platforms/android/app/src/main/java/com/sarriaroman/PhotoViewer/PhotoActivity.java:34: error: package uk.co.senab.photoview does not exist
import uk.co.senab.photoview.PhotoViewAttacher;
^
/Users/yangliu/dev/qin-app-all/4.0.0/qin/platforms/android/app/src/main/java/com/sarriaroman/PhotoViewer/PhotoActivity.java:37: error: cannot find symbol
private PhotoViewAttacher mAttacher;
^
symbol: class PhotoViewAttacher
location: class PhotoActivity
/Users/yangliu/dev/qin-app-all/4.0.0/qin/platforms/android/app/src/main/java/com/sarriaroman/PhotoViewer/PhotoActivity.java:177: error: cannot find symbol
private RequestCreator setOptions(RequestCreator picasso) throws JSONException {
^
symbol: class RequestCreator
location: class PhotoActivity
/Users/yangliu/dev/qin-app-all/4.0.0/qin/platforms/android/app/src/main/java/com/sarriaroman/PhotoViewer/PhotoActivity.java:177: error: cannot find symbol
private RequestCreator setOptions(RequestCreator picasso) throws JSONException {
^
symbol: class RequestCreator
location: class PhotoActivity
/Users/yangliu/dev/qin-app-all/4.0.0/qin/platforms/android/app/src/main/java/com/sarriaroman/PhotoViewer/PhotoActivity.java:151: error: cannot find symbol
mAttacher = new PhotoViewAttacher(photo);
^
symbol: class PhotoViewAttacher
location: class PhotoActivity
/Users/yangliu/dev/qin-app-all/4.0.0/qin/platforms/android/app/src/main/java/com/sarriaroman/PhotoViewer/PhotoActivity.java:198: error: cannot find symbol
this.setOptions(Picasso.get().load(mImage)).into(photo, new Callback() {
^
symbol: class Callback
location: class PhotoActivity
/Users/yangliu/dev/qin-app-all/4.0.0/qin/platforms/android/app/src/main/java/com/sarriaroman/PhotoViewer/PhotoActivity.java:198: error: cannot find symbol
this.setOptions(Picasso.get().load(mImage)).into(photo, new Callback() {
^
symbol: variable Picasso
location: class PhotoActivity
/Users/yangliu/dev/qin-app-all/4.0.0/qin/platforms/android/app/src/main/java/com/sarriaroman/PhotoViewer/PhotoActivity.java:225: error: cannot find symbol
.into(photo, new Callback() {
^
symbol: class Callback
/Users/yangliu/dev/qin-app-all/4.0.0/qin/platforms/android/app/src/main/java/com/sarriaroman/PhotoViewer/PhotoActivity.java:224: error: cannot find symbol
setOptions(Picasso.get().load(mTempImage))
I am using the ionic 4 with Cordova framework.
When I try to build on Android
ionic cordova build android
, it always return me with the following issue, seems that gradle is not able to source the picasso packages. I am using gradle, and even in Android studio I cannot make it work.The error while building:
Here is my cordova environment:
Thanks in advance