I’m trying to create an Expo module using the template provided in the docs here:
https://docs.expo.dev/modules/native-module-tutorial/
When I try to actually write some code and accessing libraries I get no type definitions and a “No definitions” tooltip. Trying to run Gradle results in this log:
<code>BUILD FAILED in 64ms
/dir-path/my-expo-plugin/android/build.gradle: Build file '/dir-path/my-expo-plugin/android/build.gradle' line: 1
A problem occurred evaluating root project 'android'.
> Plugin with id 'com.android.library' not found.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
BUILD FAILED in 64ms
</code>
<code>BUILD FAILED in 64ms
/dir-path/my-expo-plugin/android/build.gradle: Build file '/dir-path/my-expo-plugin/android/build.gradle' line: 1
A problem occurred evaluating root project 'android'.
> Plugin with id 'com.android.library' not found.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
BUILD FAILED in 64ms
</code>
BUILD FAILED in 64ms
/dir-path/my-expo-plugin/android/build.gradle: Build file '/dir-path/my-expo-plugin/android/build.gradle' line: 1
A problem occurred evaluating root project 'android'.
> Plugin with id 'com.android.library' not found.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
BUILD FAILED in 64ms
What I tried (after npx create-expo-module expo-settings
):
- Opening the /android part of the plugin as a project in Fleet/ Android Studio
- Opening the whole thing (same results)
What am I doing wrong here?
When I did capacitor plugins I wanted to shoot myself, and now this. Please help me in this voluntary journey to the gates of madness.
Thx.