SlideShare ist ein Scribd-Unternehmen logo
1 von 8
Downloaden Sie, um offline zu lesen
UE4でAndroidビルド
...できなかった...
Androidでビルドしようとしたが...
エラーの原因は
AndroidHttpClient…
Android 6 Marshmallow(SDK23)以降では
使えない...
http://qiita.com/FumihikoSHIROYAMA/items/b6e82c
20b518c4d9a219
UE4さん何とかなりませんかね????
Android6.0以降対応
このほかに
activity.requestPermissions(java.lang.String[], int);
というメソッドを呼び出して、Permissionを聞かないといけない。
https://developer.android.com/reference/android/app/Activity.html#requestPermiss
ions(java.lang.String[], int)
しかし、2016/10/10現在、UE4のGithub上に該当のソースコードが記載されていないよ
うだ...
Android6.0以降でPermissionをきくユースケース
// 設定されているパーミッションの一覧を取得する
public static ArrayList<String> getSettingPermissions(Context context){
ArrayList<String> list = new ArrayList<String>();
PackageInfo packageInfo = null;
try {
packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), PackageManager.GET_PERMISSIONS);
} catch (PackageManager.NameNotFoundException e) {
e.printStackTrace();
}
if(packageInfo == null || packageInfo.requestedPermissions == null) return list;
for(String permission : packageInfo.requestedPermissions){
list.add(permission);
}
return list;
}
参照
https://github.com/TakuKobayashi/ggrks_scanner/blob/master/app/src/main/java/kobayashi/taku/com/ggrks_scanner/ApplicationHelper.java
Android6.0以降でPermissionをきくユースケース
// 既にユーザーがパーミッションを承認しているかどうか
public static boolean hasSelfPermission(Context context, String permission) {
if(Build.VERSION.SDK_INT < 23) return true;
return context.checkSelfPermission(permission) == PackageManager.PERMISSION_GRANTED;
}
参照
https://github.com/TakuKobayashi/ggrks_scanner/blob/master/app/src/main/java/kobayashi/taku/com/ggrks_scanner/ApplicationHelper.java
Android6.0以降でPermissionをきくユースケース
// パーミッションを聞く
public static void requestPermissions(Activity activity, int requestCode){
if(Build.VERSION.SDK_INT >= 23) {
ArrayList<String> permissions = ApplicationHelper.getSettingPermissions(activity);
boolean isRequestPermission = false;
for(String permission : permissions){
if(!ApplicationHelper.hasSelfPermission(activity, permission)){
isRequestPermission = true;
break;
}
}
if(isRequestPermission) {
activity.requestPermissions(permissions.toArray(new String[0]), requestCode);
}
}
}
参照
https://github.com/TakuKobayashi/ggrks_scanner/blob/master/app/src/main/java/kobayashi/taku/com/ggrks_scanner/ApplicationHelper.java
最後に
EpicGamesのGithubに今回の件の修正にPull Requestをだそうか悩み中...

Weitere ähnliche Inhalte

Empfohlen

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Empfohlen (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Ue4でandroidビルド ...できなかった...