capacitor-community / in-app-review

Let users rate your app using native review app dialog for both Android and iOS.
MIT License
163 stars 20 forks source link

Compilation error for Android #33

Closed cyrilfr closed 2 years ago

cyrilfr commented 2 years ago

When I try to compile the app, I get an error for Android:

[capacitor]         > Task :app:processDebugManifestForPackage
[capacitor]         /home/cyril/Documents/SharemanApp/node_modules/capacitor-rate-app/android/src/main/java/com/capacitor/rateapp/CapacitorRateApp.java:3: error: package android.content does not exist
[capacitor]         import android.content.Context;
[capacitor]         ^
[capacitor]         /home/cyril/Documents/SharemanApp/node_modules/capacitor-rate-app/android/src/main/java/com/capacitor/rateapp/CapacitorRateApp.java:4: error: package android.content does not exist
[capacitor]         import android.content.Intent;
[capacitor]         ^
[capacitor]         /home/cyril/Documents/SharemanApp/node_modules/capacitor-rate-app/android/src/main/java/com/capacitor/rateapp/CapacitorRateApp.java:5: error: package android.net does not exist
[capacitor]         import android.net.Uri;
[capacitor]         ^
[capacitor]         /home/cyril/Documents/SharemanApp/node_modules/capacitor-rate-app/android/src/main/java/com/capacitor/rateapp/CapacitorRateApp.java:6: error: package android.util does not exist
[capacitor]         import android.util.Log;
[capacitor]         ^
[capacitor]         /home/cyril/Documents/SharemanApp/node_modules/capacitor-rate-app/android/src/main/java/com/capacitor/rateapp/CapacitorRateAppPlugin.java:3: error: package android.content does not exist
[capacitor]         import android.content.Context;
[capacitor]         ^
[capacitor]         /home/cyril/Documents/SharemanApp/node_modules/capacitor-rate-app/android/src/main/java/com/capacitor/rateapp/CapacitorRateApp.java:23: error: cannot access Activity
[capacitor]         final ReviewManager manager = ReviewManagerFactory.create(activity);
[capacitor]         ^
[capacitor]         class file for android.app.Activity not found
[capacitor]         /home/cyril/Documents/SharemanApp/node_modules/capacitor-rate-app/android/src/main/java/com/capacitor/rateapp/CapacitorRateApp.java:47: error: cannot find symbol
[capacitor]         Log.i("RateApp", "Request review flow finished");
[capacitor]         ^
[capacitor]         symbol: variable Log
[capacitor]         7 errors

I'm using Capacitor 3.7

Nodonisko commented 2 years ago

What version? Please try capacitor-rate-app@2.0.0 because latest version supports only Capacitor 4

cyrilfr commented 2 years ago

I was using the last version. Now with 2.0.0 it works! Thank you.