Capacitor - svelte

Assets Build Functionality


Assets (like icons, etc) need to be in resources/ directory.
Then install npm install @capacitor/assets --save-dev
Then build with npx capacitor-assets generate

        

Plugins

https://capacitorjs.com/docs/apis
        

Error 1


[error]
    FAILURE: Build failed with an exception.

    * What went wrong:
    A problem occurred configuring root project 'android'.
    > Could not resolve all files for configuration ':classpath'.
    > Could not resolve com.android.tools.build:gradle:8.0.0.
    Required by:
    project :
    > No matching variant of com.android.tools.build:gradle:8.0.0 was found. The consumer was configured to find a
    library for use during runtime, compatible with Java 8, packaged as a jar, and its dependencies declared
    externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.0.2' but:
    .....
    .....
    etc....



Solution:
    Ok, so I `think` the solution is to change the java version to 11 or 17 ( I did 17 and it worked ).
    If it doesn't exist, download deb file from Oracle website and then install with sudo dpkg -i /path/to/.deb
        sudo update-alternatives --config java