我是swift编程的新手。我正在尝试下载项目的库。我已经安装了可可豆荚:sudo gem install cocoa pods,创建了包含我需要的所有库的pod文件:pod' GoogleMaps'。安装pod后我收到错误:
Unable to satisfy the following requirements:
- `GoogleMaps` required by `Podfile`
- `GoogleMaps` required by `Podfile`
- `GoogleMaps (= 2.3.1)` required by `Podfile.lock`
Specs satisfying the `GoogleMaps, GoogleMaps (= 2.3.1)` dependency
were found, but they required a higher minimum deployment target.
[!] Automatically assigning platform ios with version 7.0 on target
Taxi for rider because no platform was specified. Please specify a
platform for this target in your Podfile. See
`https://guides.cocoapods.org/syntax/podfile.html#platform`.
我的pod文件:
# Uncomment the next line to define a global platform for your
project
# platform :ios, '9.0'
target 'Taxi for rider' do
# Comment the next line if you're not using Swift and don't want to
use dynamic frameworks
use_frameworks!
# Pods for Taxi for rider
pod 'Firebase'
pod 'Firebase/Storage'
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'GoogleMaps'
pod 'GoogleMaps'
pod 'GooglePlaces'
pod 'GooglePlacesAPI'
pod 'GooglePlacePicker'
pod 'SwiftyJSON'
pod 'Firebase/Core'
pod 'Firebase/Storage'
end
答案 0 :(得分:1)
用以下文字替换您的podfile文本:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'Taxi for rider' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for Taxi for rider
pod 'Firebase'
pod 'Firebase/Storage'
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'GoogleMaps'
pod 'GoogleMaps'
pod 'GooglePlaces'
pod 'GooglePlacesAPI'
pod 'GooglePlacePicker'
pod 'SwiftyJSON'
pod 'Firebase/Core'
pod 'Firebase/Storage'
end
以下是代码中的错误行:
# Uncomment the next line to define a global platform for your
project
应该是:
# Uncomment the next line to define a global platform for your project
您已多次添加pod 'GoogleMaps'
。
答案 1 :(得分:0)
您应该在Podfile中为项目定义一个平台。将其附加到Podfile的开头:
public void onOpenDocument(PdfWriter writer, Document document) {
total = writer.getDirectContent().createTemplate(30, 16);
try {
totalPages = Image.getInstance(total);
} catch (BadElementException e) {
e.printStackTrace();
}
totalPages.setRole(PdfName.ARTIFACT);
}
public void onEndPage(PdfWriter writer, Document document) {
footer.writeSelectedRows(0, -100, 36, 65, writer.getDirectContent());
try {
PdfPCell cell = new PdfPCell(Image.getInstance(total));
} catch (BadElementException e) {
e.printStackTrace();
}
Phrase footerPhrase = new Phrase("Page "+writer.getPageNumber()+
" of");
footerPhrase.add(new Chunk(totalPages,0,0,true));
ColumnText.showTextAligned(writer.getDirectContent(), Element.ALIGN_CENTER, footerPhrase, 500, 65, 0);
}
示例:
=SUBSTITUTE(SUBSTITUTE(A1,"systemTime",""), ":","")
答案 2 :(得分:0)