Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failed due to use of deprecated Android v1 embedding #46

Open
NGHTMR3 opened this issue Apr 8, 2022 · 7 comments
Open

Build failed due to use of deprecated Android v1 embedding #46

NGHTMR3 opened this issue Apr 8, 2022 · 7 comments

Comments

@NGHTMR3
Copy link

NGHTMR3 commented Apr 8, 2022

The project is unable to compile due to the migration to Android v2 embedding. Flutter provides instructions on how to remedy this issue, but the process can be complicated for people who are new to programming.

Migration Instructions for Android v2 Embedding

@Archanciel
Copy link

Archanciel commented Apr 20, 2022

I did solve the problem without loosing time simply this way:

  • create a new dicee_flutter_master Flutter project
  • copy paste in main.dart the content of the content of the dicee-flutter main.dart
  • copy the image dir in your new project
  • add assets: - images/ in your yaml file

@mattkoch614
Copy link

FYI, I created a repo for this if you'd like to reference it, instead of performing these series of steps on your own:

https://github.com/mattkoch614/dicee-flutter-v2

See also #44, #28.

@Myzel394
Copy link

Myzel394 commented Jul 4, 2022

It's really a shame that the repos are abandoned without any information. Many people who do not know how to properly solve these issues will already fail here and maybe also loose the motivation to continue learning.

A good course should be kept up-to-date.

Sorry @angelabauer, but this is not what I expected from you.

@frankliuao
Copy link

It's really a shame that the repos are abandoned without any information. Many people who do not know how to properly solve these issues will already fail here and maybe also loose the motivation to continue learning.

A good course should be kept up-to-date.

Sorry @angelabauer, but this is not what I expected from you.

While I agree with @Myzel394 that the course files should be updated frequently to make sure they run on the newest versions, I believe the course instructor needs to be bugged by us for this otherwise she'll be submerged by all kinds of requests and questions. I'd give her some time (since I found the solution...):

While creating a new Flutter project and copying the main.dart isn't bad, there is one simple solution:

  1. Go to your AndroidManifest.xml, and add the following codes to the <activity tag:
    <meta-data
      android:name="flutterEmbedding"
      android:value="2" />
    
  2. Go to your MainActivity.java file, and replace it with
    package co.appbrewery.dicee;
    
    import io.flutter.embedding.android.FlutterActivity;
    
    public class MainActivity extends FlutterActivity {
    }
    

@TharushaRuwantha
Copy link

I did solve the problem without loosing time simply this way:

  • create a new dicee_flutter_master Flutter project
  • copy paste in main.dart the content of the content of the dicee-flutter main.dart
  • copy the image dir in your new project
  • add assets: - images/ in your yaml file

This is the only Solution worked for me : ) if any one like to clone the working project check out the link

https://github.com/TharushaRuwantha/decee-v3.git

@Akylbalta
Copy link

I did solve the problem without loosing time simply this way:

  • create a new dicee_flutter_master Flutter project
  • copy paste in main.dart the content of the content of the dicee-flutter main.dart
  • copy the image dir in your new project
  • add assets: - images/ in your yaml file

Spent like 2 hours, before finally tried these simple steps. It worked! Thank you.

@KatayR
Copy link

KatayR commented Mar 20, 2023

Thank you <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants