Skip to content

Commit bbdd289

Browse files
mars3142minggo
authored andcommitted
Fix gradlew build (#18592)
* fixed ProGuard rule file * add missing VIBRATE permission * move permission to correct position in AndroidManifest.xml
1 parent ca46b06 commit bbdd289

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

cocos/platform/android/libcocos2dx-with-controller/AndroidManifest.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.cocos2dx.lib">
22

3+
<uses-permission android:name="android.permission.VIBRATE" />
4+
35
<application android:allowBackup="true">
46

57
</application>

cocos/platform/android/libcocos2dx/AndroidManifest.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.cocos2dx.lib">
22

3+
<uses-permission android:name="android.permission.VIBRATE" />
4+
35
<application android:allowBackup="true">
46

57
</application>

templates/cpp-template-default/proj.android/app/AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
package="org.cocos2dx.hellocpp"
44
android:installLocation="auto">
55

6+
<uses-permission android:name="android.permission.INTERNET"/>
7+
68
<uses-feature android:glEsVersion="0x00020000" />
79

810
<application
@@ -28,6 +30,4 @@
2830
</activity>
2931
</application>
3032

31-
<uses-permission android:name="android.permission.INTERNET"/>
32-
3333
</manifest>

templates/cpp-template-default/proj.android/app/proguard-rules.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
-dontwarn org.cocos2dx.**
2222
-keep public class com.chukong.** { *; }
2323
-dontwarn com.chukong.**
24-
-keep public com.huawei.android.** { *; }
24+
-keep public class com.huawei.android.** { *; }
2525
-dontwarn com.huawei.android.**
2626

2727
# Proguard Apache HTTP for release

0 commit comments

Comments
 (0)