
problemas con aplicacion android
Publicado por orlando (1 intervención) el 27/10/2022 18:44:02
Soy nuevo en el desarrollo de aplicaciones, resulta que he compartido la plantilla de una aplicación de Android.
pero me da el siguiente problema cuando hago el cambio del nombre del paquete, (también hago el cambio en el build.gradle:app , reviso el manifiesto y todo está bien, he limpiado y reconstruido el proyecto y he borrado el cache y reinicie el android studio) pero me da el siguiente problema, una vez que he compilado la aplicación se la paso a mi celular pero al abrirla se cierra la aplicación y no abre, no funciona.
Nota: pero si no cambio el nombre del paquete, la aplicación funciona muy bien
build.gradle:
Manifest
pero me da el siguiente problema cuando hago el cambio del nombre del paquete, (también hago el cambio en el build.gradle:app , reviso el manifiesto y todo está bien, he limpiado y reconstruido el proyecto y he borrado el cache y reinicie el android studio) pero me da el siguiente problema, una vez que he compilado la aplicación se la paso a mi celular pero al abrirla se cierra la aplicación y no abre, no funciona.
Nota: pero si no cambio el nombre del paquete, la aplicación funciona muy bien
build.gradle:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
plugins {
id 'com.android.application'
id 'com.onesignal.androidsdk.onesignal-gradle-plugin'
//this to copied
}
def API_KEY = '"' + ApiKey + '"' ?: '"Api Key Not Found"'
def LOGIN_KEY = '"' + LoginKey + '"' ?: '"Login Key Not Found"'
def REG_KEY = '"' + RegKey + '"' ?: '"SignUp Key Not Found"'
def U_PROFILE_KEY = '"' + UprofileKey + '"' ?: '"Profile Key Not Found"'
def FP_KEY = '"' + FpKey + '"' ?: '"Forget P Key Not Found"'
def U_POINTS_KEY = '"' + UpointsKey + '"' ?: '"Update Points Key Not Found"'
def RP_KEY = '"' + RpKey + '"' ?: '"Reset P Key Not Found"'
def UD_KEY = '"' + UdKey + '"' ?: '"Update Points Key Not Found"'
def ADMIN_SETTINGS_KEY = '"' + ASettingsKey + '"' ?: '"Admin Settings Key Not Found"'
def GAME_SETTINGS_KEY = '"' + GSettingsKey + '"' ?: '"Game Settings Key Not Found"'
def REDEEM_SETTINGS_KEY = '"' + RSettingsKey + '"' ?: '"Redeem Settings Key Not Found"'
def APPS_SETTINGS_KEY = '"' + AppsSettingKey + '"' ?: '"Apps Settings Key Not Found"'
def VIDEO_SETTINGS_KEY = '"' + VideoSettingKey + '"' ?: '"Apps Settings Key Not Found"'
def VISIT_SETTINGS_KEY = '"' + VisitSettingKey + '"' ?: '"Visit Settings Key Not Found"'
def STRING = 'String'
android {
compileSdkVersion 31
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.example.app"
minSdkVersion 19
targetSdkVersion 31
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
each {type ->
type.buildConfigField STRING, 'ApiKey', API_KEY
}
each {type ->
type.buildConfigField STRING, 'LoginKey', LOGIN_KEY
}
each {type ->
type.buildConfigField STRING, 'RegKey', REG_KEY
}
each {type ->
type.buildConfigField STRING, 'UprofileKey', U_PROFILE_KEY
}
each {type ->
type.buildConfigField STRING, 'FpKey', FP_KEY
}
each {type ->
type.buildConfigField STRING, 'UpointsKey', U_POINTS_KEY
}
each {type ->
type.buildConfigField STRING, 'RpKey', RP_KEY
}
each {type ->
type.buildConfigField STRING, 'UdKey', UD_KEY
}
each {type ->
type.buildConfigField STRING, 'ASettingsKey', ADMIN_SETTINGS_KEY
}
each {type ->
type.buildConfigField STRING, 'GSettingsKey', GAME_SETTINGS_KEY
}
each {type ->
type.buildConfigField STRING, 'RSettingsKey', REDEEM_SETTINGS_KEY
}
each {type ->
type.buildConfigField STRING, 'AppsSettingKey', APPS_SETTINGS_KEY
}
each {type ->
type.buildConfigField STRING, 'VideoSettingKey', VIDEO_SETTINGS_KEY
}
each {type ->
type.buildConfigField STRING, 'VisitSettingKey', VISIT_SETTINGS_KEY
}
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.4.1' //1.3.0
implementation 'androidx.constraintlayout:constraintlayout:2.1.3' //2.1.2
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation files('../libs/unity-ads.aar')
testImplementation 'junit:junit:4.13.2' //4.13
implementation 'com.google.android.material:material:1.5.0' //1.4.0
androidTestImplementation 'androidx.test.ext:junit:1.1.3' // 1.1.2
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' //3.3.0
implementation 'com.google.android.gms:play-services-location:19.0.1'
//sceen Size
implementation 'com.intuit.sdp:sdp-android:1.0.6'
implementation 'com.intuit.ssp:ssp-android:1.0.6'
//rootbear
implementation 'com.scottyab:rootbeer-lib:0.1.0'
implementation 'com.google.firebase:firebase-messaging:23.0.0'
implementation 'com.onesignal:OneSignal:4.6.0'
//Spin
implementation 'com.github.mmoamenn:LuckyWheel_Android:0.3.0'
//scratch
implementation 'in.codeshuffle.scratchcardlayout:ScratchCardLayout:1.0.8'
//activityLifeCycle
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
//multidex
implementation 'com.android.support:multidex:1.0.3'
//volley
implementation 'com.android.volley:volley:1.2.1'//1.1.1
implementation 'com.google.code.gson:gson:2.8.6'
//:Lottie
implementation "com.airbnb.android:lottie:4.2.0" //3.4.0
//InApp Update
implementation 'com.google.android.play:core:1.10.2'
//Ads Network
implementation 'com.startapp:inapp-sdk:4.9.1'
implementation 'com.applovin:applovin-sdk:11.4.2'
implementation 'com.applovin.mediation:facebook-adapter:6.11.0.2'
implementation 'com.google.android.gms:play-services-ads-identifier'
//glide
implementation 'com.github.bumptech.glide:glide:4.12.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
// Import the BoM for the Firebase platform
implementation platform('com.google.firebase:firebase-bom:29.0.0')
implementation 'com.google.firebase:firebase-crashlytics'
implementation 'com.google.firebase:firebase-analytics'
//Chrome Tab:
implementation "androidx.browser:browser:1.4.0"
//SweetAlert
implementation 'com.github.f0ris.sweetalert:library:1.5.1'//1.5.1
implementation 'com.makeramen:roundedimageview:2.3.0'
implementation 'com.github.ibrahimsn98:SmoothBottomBar:1.7.9'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.61"
}
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'applovin-quality-service'
applovin {
apiKey "...."
}
Manifest
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.app"
tools:ignore="LockedOrientationActivity">
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission
android:name="android.permission.ACCESS_WIFI_STATE"
tools:node="remove" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.Ad_ID" />
<application
android:name="com.example.app.App"
android:hardwareAccelerated="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:networkSecurityConfig="@xml/network_security_config"
android:theme="@style/AppTheme"
tools:replace="android:icon"
tools:targetApi="n">
<meta-data android:name="applovin.sdk.key"
android:value="@string/APPLOVIN_SDK_KEY"/>
<activity
android:name="com.example.app.activity.VisitActivity"
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/NoActionBar" />
<activity
android:name="com.example.app.activity.VideoActivity"
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/NoActionBar" />
<activity
android:name="com.example.app.activity.InstallActivity"
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/NoActionBar" />
<activity
android:name="com.example.app.activity.AppsActivity"
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/NoActionBar" />
<activity
android:name="com.example.app.activity.GiftCardActivity"
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/NoActionBar" />
<activity
android:name="com.example.app.activity.WatchAndEarnActivity"
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/NoActionBar" />
<activity
android:name="com.example.app.activity.GameLoader"
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/NoActionBar" />
<activity
android:name="com.example.app.activity.GameActivity"
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
android:exported="false"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@style/NoActionBar" />
<activity
android:name="com.example.app.activity.QuizActivity"
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/NoActionBar" />
<activity
android:name="com.example.app.activity.CaptchaActivity"
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/NoActionBar" />
<activity
android:name="com.example.app.activity.PrivacyActivity"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/NoActionBar" />
<activity
android:name="com.example.app.activity.SpinActivity"
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/NoActionBar" />
<activity
android:name="com.example.app.activity.ScratchActivity"
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/NoActionBar" />
<activity
android:name="com.example.app.activity.LoginActivity"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/NoActionBar" />
<activity
android:name="com.example.app.activity.MainActivity"
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/NoActionBar" />
<activity
android:name="com.example.app.activity.SplashActivity"
android:exported="true"
android:screenOrientation="portrait"
android:theme="@style/NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data
android:name="preloaded_fonts"
android:resource="@array/preloaded_fonts" />
<service
android:name="com.example.app.services.PointsService"
android:enabled="true"
android:exported="false" />
<service
android:name="com.example.app.services.UpdateDateService"
android:enabled="true"
android:exported="false" />
<service
android:name="com.example.app.services.MyFirebaseMessagingService"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@mipmap/ic_launcher_round" />
<meta-data
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="@color/colorPrimaryDark" />
</application>
</manifest>
Valora esta pregunta


0