我有一个干净利落的项目,使用了一些cocoapods:Parse,AFNetworking和RESideMenu.我需要使用STZPopupView pod,所以我用最新版本更新了cocoapods:
gem install cocoapods
Run Code Online (Sandbox Code Playgroud)
然后我为我的项目重新启动它:
pod install
Run Code Online (Sandbox Code Playgroud)
由于这个错误:
[!] Pods written in Swift can only be integrated as frameworks; this feature is still in beta. Add `use_frameworks!` to your Podfile or target to opt into using it.
Run Code Online (Sandbox Code Playgroud)
我更新了我的podfile,添加了"use_frameworks!"
我的podfile现在是:
# Uncomment this line to define a global platform for your project
# platform :ios, '8.0'
use_frameworks!
source 'https://github.com/CocoaPods/Specs.git'
target 'isam' do
pod 'RESideMenu', '~> 4.0.7'
pod 'AFNetworking', '~> 2.5'
pod 'Parse', '~> 1.6'
pod 'STZPopupView', '~> 1.0'
end …
Run Code Online (Sandbox Code Playgroud) https://www.dropbox.com/s/lykyutdlo6386il/nexus%205%202.png?dl=0
这张照片是由nexus 5拍摄的.正如您所看到的,屏幕顶部和底部之间的差距是不同的.侧边菜单关闭时会裁剪Android徽标.底部屏幕的一部分隐藏在本机导航栏下.
https://www.dropbox.com/s/wcwuat1bwoqa26v/correct1.png?dl=0
另一方面,这张照片是由galaxy s5 mini拍摄的.您可能会注意到屏幕顶部和底部之间的间隙是相同的.完全没有问题.
它与ResideMenu库相同,具有不同的设备和Android OS(棒棒糖和kitkat).我查看布局(residemenu.xml)以找出错误的内容; 但一切似乎都对我不对.我找不到任何解决这个问题的方法.有没有办法解决正确缩放主片段(从顶部和底部相同的边距)?请帮我.
链接到库:github.com/SpecialCyCi/AndroidResideMenu
编辑:
这个链接是我正在谈论它的解决方案的问题.
android android-fragments nexus-5 android-5.0-lollipop residemenu
我使用gradle依赖项在我的项目中添加了ResideMenu.但我得到这个问题:
错误:任务':app:transformClassesWithJarMergingForDebug'的执行失败.
com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目:com/nineoldandroids/animation/Animator $ AnimatorListener.class
当我检查外部库时,我发现library-2.4.0和resideMenu-1.6都包含com.nineoldandroids:
我在stackoverflow上遇到了几乎所有类似的问题并尝试了解决方案.任何人都可以告诉我需要做些什么来消除这个问题.
以下是我在项目中使用的依赖项:
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.pnikosis:materialish-progress:1.7'
compile 'com.loopj.android:android-async-http:1.4.9'
compile 'com.google.code.gson:gson:2.6.2'
compile 'com.wrapp.floatlabelededittext:library:0.0.6'
compile 'com.android.support:multidex:1.0.1'
compile 'com.specyci:residemenu:1.6+'
}
Run Code Online (Sandbox Code Playgroud) 我有一个HomeActivity,我在那里调用片段列表.在HomeActivity中,我有sidemenu所有片段都被加载.
现在,在这个列表中,我有一个名为HomeFragment的片段,它使用webservice显示带有数据的Google Map.
我想要的是我只想加载一次(第一次)片段加载Map数据,而不是每次点击sidemenu或从任何其他片段进入.
我的HomeFragment或任何其他片段立即加载,而不是每次都加载.