Closed maxsilnov closed 2 years ago
Oh, sorry, mate. I think this template is completely outdated... You may consider take one of the examples and modifying it (here's the update Metadata in Cargo.toml
). We updated our Crossbow metadata to support complete Info.plist
and AndroidManifest.xml
- so the configuration should be like in this docs.
Thanks, everything works!
Crossbow version
cargo.toml:
[package] name = "bevy-2d" version = "0.1.3" authors = ["DodoRare Team support@dodorare.com"] edition = "2021"
[dependencies] log = "0.4" anyhow = "1.0" bevy = { version = "0.8.1", default-features = false, features = ["bevy_winit", "render", "bevy_asset"] } crossbow = "0.2.2"
[package.metadata] app_name = "Bevy 2D" version_code = 1 target_sdk_version = 30
android_package_name = "com.example.bevy_2d" android_build_targets = ["aarch64-linux-android"] android_assets = "assets" android_res = "res/android"
Additional information
**Hi again!
Now the next problem: with the "bevy" template on Android, a black screen appears and nothing else. Do I need to use something else to display the template?**
And main.rs: //! Shows how to render a polygonal [
Mesh
], generated from a [Quad
] primitive, in a 2D scene.use bevy::{prelude::*, sprite::MaterialMesh2dBundle};
fn main() { App::new() .add_plugins(DefaultPlugins) .add_startup_system(setup) .run(); }
fn setup( mut commands: Commands, mut meshes: ResMut<Assets>,
mut materials: ResMut<Assets>,
) {
commands.spawn_bundle(Camera2dBundle::default());
commands.spawn_bundle(MaterialMesh2dBundle {
mesh: meshes.add(Mesh::from(shape::Quad::default())).into(),
transform: Transform::default().with_scale(Vec3::splat(128.)),
material: materials.add(ColorMaterial::from(Color::PURPLE)),
..default()
});
}