마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

apk 설치 후 '열기' 버튼 비활성 문제

0 추천

선배님들 안녕하세요.

아래와 동일한 증상의 문제입니다.

https://www.masterqna.com/android/54302/apk-%EC%84%A4%EC%B9%98-%ED%9B%84-%EC%97%B4%EA%B8%B0-%EB%B2%84%ED%8A%BC-%EB%B9%84%ED%99%9C%EC%84%B1-%EB%AC%B8%EC%A0%9C

안드로이드 스튜디오 상에서

flutter build apk 를 실행 후 app-release.apk 파일까지는 제대로 받아집니다.

그러나, 디바이스 상에서 설치만 되고 "실행" 버튼이 비활성화 되는 문제가 발생합니다.

 

pubspec.yaml과 Manifest.xml 코드는 다음과 같습니다.

pubspec.yaml 

version: 1.0.0+1

environment:
  sdk: ">=2.12.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter
  intl: ^0.17.0
  retrofit: ^2.0.1
  dio: ^4.0.0
  logger: ^1.1.0
  json_annotation: ^4.0.1
  webview_flutter: any
  webview_windows: ^0.0.7

  # 라우터 간 화면 전환 효과
  page_transition: ^2.0.4

  # 해시태그 버튼 관리
  # flutter_tags: ^0.4.9+1

  # firebase version // cloud_firestore: firestore 데이터관리
  firebase_auth: ^3.0.1
  firebase_core: ^1.6.0
  cloud_firestore: ^3.1.0
  firebase_storage: ^10.0.3

  # kakao login version
  kakao_flutter_sdk: ^0.7.0
  platform: ^3.0.0
  package_info_plus: ^1.0.4

  # svg 벡터 이미지 사용하기 위함
  flutter_svg: ^0.22.0

  # 갤러리/카메라 이미지 파일 추가에 필요한 라이브러리
  image_cropper: ^1.4.1
  get: ^4.3.8

  # csv file 읽어들이는데 필요한 library
  path_provider: ^2.0.2
  permission_handler: ^7.1.0
  file_picker: ^3.0.4
  csv: ^5.0.0

  url_launcher: ^6.0.4

  # 서버 통신을 위한
  http: ^0.13.3


  flutter_launcher_icons: "^0.9.2"

flutter_icons:
  android: "launcher_icon"
  ios: true 
  image_path: "images/logo.png"

#  # Check that you have this dependency (added in the previous step)
#  firebase_core: ^0.4.0+9
#  # Add the dependency for the FlutterFire plugin for Google Analytics
#  firebase_analytics: ^5.0.2
#  # Add the dependencies for any other Firebase products you want to use in your app
#  # For example, to use Firebase Authentication and Cloud Firestore
#  firebase_auth: ^0.14.0+5
#  cloud_firestore: ^0.12.9+5


  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.2

dev_dependencies:
  flutter_test:
    sdk: flutter
  retrofit_generator: any
  json_serializable: ^4.1.4
  build_runner: any

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

# The following section is specific to Flutter.
flutter:

  # The following line ensures that the Material Icons font is
  # included with your application, so that you can use the icons in
  # the material Icons class.
  uses-material-design: true

  # To add assets to your application, add an assets section, like this:
  assets:
      - images/
      - images/bcs/
      - images/bottomBar/
      - images/community/
      - images/loginIcon/
      - images/profile/
      - images/shorts/
      - images/svg/
      - images/product/
      - images/allergyIcon/

 

app>src>main>AndroidManifest.xml

 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.A">
   <application
        android:label="A"
        android:icon="@mipmap/launcher_icon">
        <activity
            android:name="com.A.MainActivity"
            android:launchMode="singleTop"
            android:theme="@style/LaunchTheme"
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
            android:hardwareAccelerated="true"
            android:windowSoftInputMode="adjustResize">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
                <data android:scheme="kakaoA" android:host="oauth"/>
            </intent-filter>
            <!-- Specifies an Android theme to apply to this Activity as soon as
                 the Android process has started. This theme is visible to the user
                 while the Flutter UI initializes. After that, this theme continues
                 to determine the Window background behind the Flutter UI. -->
            <meta-data
              android:name="io.flutter.embedding.android.NormalTheme"
              android:resource="@style/NormalTheme"
              />
            <!-- Displays an Android View that continues showing the launch screen
                 Drawable until Flutter paints its first frame, then this splash
                 screen fades out. A splash screen is useful to avoid any visual
                 gap between the end of Android's launch screen and the painting of
                 Flutter's first frame. -->
            <meta-data
              android:name="io.flutter.embedding.android.SplashScreenDrawable"
              android:resource="@drawable/launch_background"
              />
        </activity>
        <!-- Don't delete the meta-data below.
             This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
        <activity
           android:name="com.yalantis.ucrop.UCropActivity"
           android:screenOrientation="portrait"
           android:theme="@style/Theme.AppCompat.Light.NoActionBar"/>
        <meta-data
            android:name="flutterEmbedding"
            android:value="2" />
    </application>
     <uses-permission android:name="android.permission.INTERNET" />
     <!--
     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
     <uses-permission android:name="android.permission.VIBRATE" />
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
     -->
</manifest>

 

예비개발자 (160 포인트) 님이 2021년 12월 6일 질문

1개의 답변

+1 추천
 
채택된 답변

희한하네요. 혹 아래처럼 MainActivity의 intent-filer data태그 부분을 주석 처리하시거나 다른 intent-filter로 옮겨보시겠어요?
 

<intent-filter>
       <action android:name="android.intent.action.MAIN"/>
       <category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>



또는

 

<intent-filter>
       <action android:name="android.intent.action.MAIN"/>
       <category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
        <data android:scheme="kakaoA" android:host="oauth"/>
</intent-filter>

 

spark (224,800 포인트) 님이 2021년 12월 7일 답변
예비개발자님이 2021년 12월 7일 채택됨
정말정말 감사드립니다!!!!!!!
두번째 코드처럼
intent-filter <data kakao> 부분을 밑으로 분리를 하니 해결되었습니다.
...