Closed andrewl94 closed 3 years ago
Something new here?
I had to go back to using Capacitor 2.4 IMO the Capacitor 3 are not worth the trouble for now.
I was able to get the build to work by adding these lines to the /android/build.gradle file
ext {
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.12'
// Add here
+ androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.2.0'
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.1'
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.2.0'
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':capacitor-android')
// And here
+ implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
testImplementation "junit:junit:$junitVersion"
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
}
But the plugin code itself doesn't seem to be functioning after a successful build. Calls to play()
throw the following error on both iOS and Android.
Uncaught Error: Method not implemented.
Howler.js seems to do the job in the meantime, if you need to be on Capacitor 3.
@andrewl94 If your issue connected with plugin, please send message here.
Describe the bug
After updating to Capacitor 3 I've been receiving the error bellow. I already used Refactor > Migrate to AndroidX. Before the refactor other plugins were giving similar error, but probably solved by the refactor. I'm really lost, probably I need to change some reference somewhere, but I had no luck researching that for now.
{{project_dir}}\app\src-capacitor\node_modules\@capacitor-community\native-audio\android\src\main\java\com\getcapacitor\community\audio\NativeAudio.java:54: error: cannot access AppCompatActivity .getActivity() ^ class file for androidx.appcompat.app.AppCompatActivity not found
My gradle variables:
To Reproduce Steps to reproduce the behavior:
Screenshots
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context Add any other context about the problem here.