我在我的Android应用程序中有adobe sitecatalyst,
并发现了下面提到的堆栈跟踪的几次崩溃。
Fatal Exception: java.lang.OutOfMemoryError: int[] of length 1674283432 exceeds the VM limit
at android.util.ArrayMap.allocArrays(ArrayMap.java:196)
at android.util.ArrayMap.ensureCapacity(ArrayMap.java:307)
at android.os.Bundle.unparcel(Bundle.java:247)
at android.os.Bundle.containsKey(Bundle.java:299)
at com.adobe.mobile.ReferrerHandler.getReferrerURLFromIntent(SourceFile:97)
at com.adobe.mobile.ReferrerHandler.processIntent(SourceFile:63)
at com.adobe.mobile.Analytics$10.run(SourceFile:211)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
在adobe分析代码中的某个地方,它创建了更大的数组。
有什么解决方案吗?
答案 0 :(得分:0)
我研究了你在应用程序中遇到的错误,我找到了2个答案,他们都将 javaMaxHeapSize 更改为" 4g"在 dexOptions 中 请检查以下链接,希望它能正常工作
Android - Java heap space error
答案 1 :(得分:0)
试用清单文件的此应用程序标记..
public function store1(Request $request){
$this->validate($request, [
'input_img' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048',
]);
$user_info = Session::get('data');
$UserImage = new UserImage($request->input()) ;
if($file = $request->hasFile('input_img')) {
$file = $request->file('input_img');
$fileName = $file->getClientOriginalExtension() ;
$destinationPath = public_path().'/images' ;
$file->move($destinationPath,$fileName);
$UserImage->userImage = $fileName ;
$UserImage = UserImage::create(['file' => $request->file('input_img')]);
$UserImage->user_infos()->associate($user_info);
}
$UserImage->save() ;
//dd($UserImage);
return redirect('/home');
}